@freelancercom/phabricator-mcp 2.0.9 → 2.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ export function registerDifferentialTools(server, client) {
10
10
  authorPHIDs: z.array(z.string()).optional().describe('Author PHIDs'),
11
11
  reviewerPHIDs: z.array(z.string()).optional().describe('Reviewer PHIDs'),
12
12
  repositoryPHIDs: z.array(z.string()).optional().describe('Repository PHIDs'),
13
- statuses: z.array(z.string()).optional().describe('Statuses: needs-review, needs-revision, accepted, published, abandoned, changes-planned'),
13
+ statuses: z.array(z.string()).optional().describe('Statuses: needs-review, needs-revision, accepted, published, abandoned, changes-planned, draft'),
14
14
  responsiblePHIDs: z.array(z.string()).optional().describe('User PHIDs who are responsible (as author or reviewer)'),
15
15
  affectedPaths: z.array(z.string()).optional().describe('File paths affected by the revision'),
16
16
  createdStart: z.coerce.number().optional().describe('Created after (epoch timestamp)'),
@@ -162,6 +162,8 @@ export function registerDiffusionTools(server, client) {
162
162
  status: z.enum(['active', 'inactive']).optional().describe('Repository status'),
163
163
  addProjectPHIDs: z.array(z.string()).optional().describe('Project PHIDs to add'),
164
164
  removeProjectPHIDs: z.array(z.string()).optional().describe('Project PHIDs to remove'),
165
+ addSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to add'),
166
+ removeSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to remove'),
165
167
  space: z.string().optional().describe('Space PHID (for multi-space installations)'),
166
168
  }, async (params) => {
167
169
  const transactions = [];
@@ -192,6 +194,12 @@ export function registerDiffusionTools(server, client) {
192
194
  if (params.removeProjectPHIDs !== undefined) {
193
195
  transactions.push({ type: 'projects.remove', value: params.removeProjectPHIDs });
194
196
  }
197
+ if (params.addSubscriberPHIDs !== undefined) {
198
+ transactions.push({ type: 'subscribers.add', value: params.addSubscriberPHIDs });
199
+ }
200
+ if (params.removeSubscriberPHIDs !== undefined) {
201
+ transactions.push({ type: 'subscribers.remove', value: params.removeSubscriberPHIDs });
202
+ }
195
203
  if (params.space !== undefined) {
196
204
  transactions.push({ type: 'space', value: params.space });
197
205
  }
@@ -5,11 +5,20 @@ export function registerFileTools(server, client) {
5
5
  server.tool('phabricator_file_upload', 'Upload a file to Phabricator. Returns a file PHID that can be used with phabricator_file_info to get the file ID for embedding in Remarkup via {F<id>}.', {
6
6
  name: z.string().describe('Filename with extension (e.g. "screenshot.png")'),
7
7
  data_base64: z.string().describe('Base64-encoded file content'),
8
+ viewPolicy: z.string().optional().describe('File visibility policy (e.g., "public", "users", or a custom policy PHID)'),
9
+ canCDN: z.boolean().optional().describe('Whether the file can be served over CDN (for public assets)'),
8
10
  }, async (params) => {
9
- const phid = await client.call('file.upload', {
11
+ const apiParams = {
10
12
  name: params.name,
11
13
  data_base64: params.data_base64,
12
- });
14
+ };
15
+ if (params.viewPolicy !== undefined) {
16
+ apiParams.viewPolicy = params.viewPolicy;
17
+ }
18
+ if (params.canCDN !== undefined) {
19
+ apiParams.canCDN = params.canCDN;
20
+ }
21
+ const phid = await client.call('file.upload', apiParams);
13
22
  return { content: [{ type: 'text', text: phid }] };
14
23
  });
15
24
  // Search files
@@ -21,8 +21,8 @@ export function registerManiphestTools(server, client) {
21
21
  modifiedEnd: z.coerce.number().optional().describe('Modified before (epoch timestamp)'),
22
22
  parentIDs: z.array(z.coerce.number()).optional().describe('Parent task IDs'),
23
23
  subtaskIDs: z.array(z.coerce.number()).optional().describe('Subtask IDs'),
24
- hasParents: z.boolean().optional().describe('Filter to tasks that have open parent tasks'),
25
- hasSubtasks: z.boolean().optional().describe('Filter to tasks that have open subtasks'),
24
+ hasParents: z.boolean().optional().describe('true: only tasks with open parent tasks. false: only tasks without. Omit to show all.'),
25
+ hasSubtasks: z.boolean().optional().describe('true: only tasks with open subtasks. false: only tasks without. Omit to show all.'),
26
26
  spaces: z.array(z.string()).optional().describe('Filter by Space PHIDs (for multi-space installations)'),
27
27
  closedStart: z.coerce.number().optional().describe('Closed after (epoch timestamp)'),
28
28
  closedEnd: z.coerce.number().optional().describe('Closed before (epoch timestamp)'),
@@ -86,7 +86,7 @@ export function registerPhameTools(server, client) {
86
86
  ids: z.array(z.coerce.number()).optional().describe('Post IDs'),
87
87
  phids: z.array(z.string()).optional().describe('Post PHIDs'),
88
88
  blogPHIDs: z.array(z.string()).optional().describe('Filter by blog PHIDs'),
89
- visibility: z.array(z.string()).optional().describe('Visibility: "published", "draft", "archived" (or numeric: "1", "0", "2")'),
89
+ visibility: z.array(z.coerce.number()).optional().describe('Visibility values: 0 (draft), 1 (published), 2 (archived)'),
90
90
  subscribers: z.array(z.string()).optional().describe('Subscriber user/project PHIDs'),
91
91
  projects: z.array(z.string()).optional().describe('Project PHIDs'),
92
92
  query: z.string().optional().describe('Full-text search query'),
@@ -109,7 +109,7 @@ export function registerPhameTools(server, client) {
109
109
  body: z.string().describe('Post body content (supports Remarkup)'),
110
110
  blogPHID: z.string().describe('PHID of the blog to post to'),
111
111
  subtitle: z.string().optional().describe('Post subtitle'),
112
- visibility: z.string().optional().describe('Visibility: "published", "draft", "archived" (default: draft)'),
112
+ visibility: z.coerce.number().optional().describe('Visibility: 0 (draft, default), 1 (published), 2 (archived)'),
113
113
  addSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to add'),
114
114
  }, async (params) => {
115
115
  const transactions = [
@@ -135,7 +135,7 @@ export function registerPhameTools(server, client) {
135
135
  title: z.string().optional().describe('New post title'),
136
136
  subtitle: z.string().optional().describe('New post subtitle'),
137
137
  body: z.string().optional().describe('New post body content (supports Remarkup)'),
138
- visibility: z.string().optional().describe('Visibility: "published", "draft", "archived"'),
138
+ visibility: z.coerce.number().optional().describe('Visibility: 0 (draft), 1 (published), 2 (archived)'),
139
139
  blogPHID: z.string().optional().describe('Move post to a different blog (PHID)'),
140
140
  addSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to add'),
141
141
  removeSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to remove'),
@@ -8,7 +8,7 @@ export function registerPhidTools(server, client) {
8
8
  return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
9
9
  });
10
10
  // Query PHID details
11
- server.tool('phabricator_phid_query', 'Get detailed information about PHIDs', {
11
+ server.tool('phabricator_phid_query', 'Get handle information (name, URI, type, status) for PHIDs. For full object data, use application-specific search tools (e.g., phabricator_task_search, phabricator_revision_search).', {
12
12
  phids: z.array(z.string()).describe('PHIDs to query'),
13
13
  }, async (params) => {
14
14
  const result = await client.call('phid.query', { phids: params.phids });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@freelancercom/phabricator-mcp",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "MCP server for Phabricator Conduit API - manage tasks, code reviews, repositories, and more",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",