@freelancercom/phabricator-mcp 2.0.3 → 2.0.4
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.
- package/README.md +3 -2
- package/dist/tools/audit.js +1 -1
- package/dist/tools/conpherence.js +6 -2
- package/dist/tools/differential.js +7 -15
- package/dist/tools/diffusion.js +67 -5
- package/dist/tools/feed.js +1 -1
- package/dist/tools/maniphest.js +2 -2
- package/dist/tools/phriction.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -175,7 +175,7 @@ Add to your `~/.claude/settings.json`:
|
|
|
175
175
|
"mcp__phabricator__phabricator_revision_search",
|
|
176
176
|
"mcp__phabricator__phabricator_diff_search",
|
|
177
177
|
"mcp__phabricator__phabricator_diff_raw",
|
|
178
|
-
"
|
|
178
|
+
"mcp__phabricator__phabricator_revision_paths",
|
|
179
179
|
"mcp__phabricator__phabricator_repository_search",
|
|
180
180
|
"mcp__phabricator__phabricator_commit_search",
|
|
181
181
|
"mcp__phabricator__phabricator_repository_browse",
|
|
@@ -237,7 +237,7 @@ To allowlist all tools including write operations, use `"mcp__phabricator__*"` i
|
|
|
237
237
|
| `phabricator_revision_inline_comment` | Create an inline comment on a specific line of a diff |
|
|
238
238
|
| `phabricator_diff_raw` | Get the raw diff/patch content for a diff by ID |
|
|
239
239
|
| `phabricator_diff_search` | Search diffs (code change snapshots within a revision) |
|
|
240
|
-
| `
|
|
240
|
+
| `phabricator_revision_paths` | Get the list of changed file paths for a revision |
|
|
241
241
|
|
|
242
242
|
### Repositories (Diffusion)
|
|
243
243
|
|
|
@@ -251,6 +251,7 @@ To allowlist all tools including write operations, use `"mcp__phabricator__*"` i
|
|
|
251
251
|
| `phabricator_tag_search` | List tags in a repository |
|
|
252
252
|
| `phabricator_repository_file_history` | Get commit history for a file path |
|
|
253
253
|
| `phabricator_repository_code_search` | Search (grep) file contents within a repository |
|
|
254
|
+
| `phabricator_repository_edit` | Create or edit a Diffusion repository |
|
|
254
255
|
|
|
255
256
|
### Users
|
|
256
257
|
|
package/dist/tools/audit.js
CHANGED
|
@@ -4,7 +4,7 @@ export function registerAuditTools(server, client) {
|
|
|
4
4
|
server.tool('phabricator_audit_query', 'Search commit audit requests. Find commits needing audit, or audits by a specific user. Uses the audit.query endpoint (no modern replacement available).', {
|
|
5
5
|
auditorPHIDs: z.array(z.string()).optional().describe('Auditor user/project PHIDs'),
|
|
6
6
|
commitPHIDs: z.array(z.string()).optional().describe('Commit PHIDs to check audit status for'),
|
|
7
|
-
status: z.string().optional().describe('Audit status filter: "audit-
|
|
7
|
+
status: z.string().optional().describe('Audit status filter: "audit-status-any" (default), "audit-status-open", "audit-status-concern", "audit-status-accepted", "audit-status-partial"'),
|
|
8
8
|
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
9
9
|
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
10
10
|
}, async (params) => {
|
|
@@ -41,7 +41,7 @@ export function registerConpherenceTools(server, client) {
|
|
|
41
41
|
participantPHIDs: z.array(z.string()).optional().describe('Participant user PHIDs to add'),
|
|
42
42
|
}, async (params) => {
|
|
43
43
|
const transactions = [
|
|
44
|
-
{ type: '
|
|
44
|
+
{ type: 'name', value: params.title },
|
|
45
45
|
];
|
|
46
46
|
if (params.message !== undefined) {
|
|
47
47
|
transactions.push({ type: 'comment', value: params.message });
|
|
@@ -56,13 +56,17 @@ export function registerConpherenceTools(server, client) {
|
|
|
56
56
|
server.tool('phabricator_conpherence_edit', 'Edit a Conpherence chat room/thread. Rename it or manage participants.', {
|
|
57
57
|
objectIdentifier: z.string().describe('Room ID or PHID'),
|
|
58
58
|
title: z.string().optional().describe('New room title'),
|
|
59
|
+
topic: z.string().optional().describe('Room topic/description'),
|
|
59
60
|
addParticipantPHIDs: z.array(z.string()).optional().describe('Participant PHIDs to add'),
|
|
60
61
|
removeParticipantPHIDs: z.array(z.string()).optional().describe('Participant PHIDs to remove'),
|
|
61
62
|
comment: z.string().optional().describe('Send a message alongside the edit (supports Remarkup)'),
|
|
62
63
|
}, async (params) => {
|
|
63
64
|
const transactions = [];
|
|
64
65
|
if (params.title !== undefined) {
|
|
65
|
-
transactions.push({ type: '
|
|
66
|
+
transactions.push({ type: 'name', value: params.title });
|
|
67
|
+
}
|
|
68
|
+
if (params.topic !== undefined) {
|
|
69
|
+
transactions.push({ type: 'topic', value: params.topic });
|
|
66
70
|
}
|
|
67
71
|
if (params.addParticipantPHIDs !== undefined) {
|
|
68
72
|
transactions.push({ type: 'participants.add', value: params.addParticipantPHIDs });
|
|
@@ -45,7 +45,7 @@ export function registerDifferentialTools(server, client) {
|
|
|
45
45
|
addProjectPHIDs: z.array(z.string()).optional().describe('Add projects'),
|
|
46
46
|
removeProjectPHIDs: z.array(z.string()).optional().describe('Remove projects'),
|
|
47
47
|
comment: z.string().optional().describe('Add a comment'),
|
|
48
|
-
action: z.enum(['accept', 'reject', 'abandon', 'reclaim', 'request-review', 'resign', 'commandeer', 'plan-changes', 'close']).optional().describe('Revision action to take'),
|
|
48
|
+
action: z.enum(['accept', 'reject', 'abandon', 'reclaim', 'reopen', 'request-review', 'resign', 'commandeer', 'plan-changes', 'close', 'draft']).optional().describe('Revision action to take'),
|
|
49
49
|
addSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to add'),
|
|
50
50
|
removeSubscriberPHIDs: z.array(z.string()).optional().describe('Subscriber PHIDs to remove'),
|
|
51
51
|
repositoryPHID: z.string().optional().describe('Repository PHID to associate with the revision'),
|
|
@@ -127,21 +127,13 @@ export function registerDifferentialTools(server, client) {
|
|
|
127
127
|
const result = await client.call('differential.diff.search', params);
|
|
128
128
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
129
129
|
});
|
|
130
|
-
//
|
|
131
|
-
server.tool('
|
|
132
|
-
|
|
133
|
-
constraints: jsonCoerce(z.object({
|
|
134
|
-
diffPHIDs: z.array(z.string()).optional().describe('Diff PHIDs to list changesets for'),
|
|
135
|
-
})).optional().describe('Search constraints'),
|
|
136
|
-
attachments: jsonCoerce(z.object({
|
|
137
|
-
hunks: z.boolean().optional().describe('Include diff hunks (actual changed content)'),
|
|
138
|
-
})).optional().describe('Data attachments'),
|
|
139
|
-
order: z.string().optional().describe('Result order'),
|
|
140
|
-
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
141
|
-
after: z.string().optional().describe('Cursor for next-page pagination'),
|
|
142
|
-
before: z.string().optional().describe('Cursor for previous-page pagination'),
|
|
130
|
+
// Get changed file paths for a revision
|
|
131
|
+
server.tool('phabricator_revision_paths', 'Get the list of changed file paths for a Differential revision. Returns an array of file path strings.', {
|
|
132
|
+
revision_id: z.coerce.number().describe('Numeric revision ID (e.g., 123). Do not include the "D" prefix.'),
|
|
143
133
|
}, async (params) => {
|
|
144
|
-
const result = await client.call('differential.
|
|
134
|
+
const result = await client.call('differential.getcommitpaths', {
|
|
135
|
+
revision_id: params.revision_id,
|
|
136
|
+
});
|
|
145
137
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
146
138
|
});
|
|
147
139
|
// Create inline comment on a diff
|
package/dist/tools/diffusion.js
CHANGED
|
@@ -57,12 +57,11 @@ export function registerDiffusionTools(server, client) {
|
|
|
57
57
|
path: z.string().describe('Path to browse (e.g., "/", "/src/")'),
|
|
58
58
|
repository: z.string().optional().describe('Repository callsign, short name, or PHID'),
|
|
59
59
|
commit: z.string().optional().describe('Commit hash or branch name (default: HEAD)'),
|
|
60
|
+
needValidityOnly: z.boolean().optional().describe('Only check path validity without loading the full tree'),
|
|
61
|
+
limit: z.coerce.number().optional().describe('Maximum entries to return'),
|
|
62
|
+
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
60
63
|
}, async (params) => {
|
|
61
|
-
const result = await client.call('diffusion.browsequery',
|
|
62
|
-
path: params.path,
|
|
63
|
-
repository: params.repository,
|
|
64
|
-
commit: params.commit,
|
|
65
|
-
});
|
|
64
|
+
const result = await client.call('diffusion.browsequery', params);
|
|
66
65
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
67
66
|
});
|
|
68
67
|
// Read file content from repository
|
|
@@ -89,6 +88,8 @@ export function registerDiffusionTools(server, client) {
|
|
|
89
88
|
server.tool('phabricator_branch_search', 'List branches in a Diffusion repository', {
|
|
90
89
|
repository: z.string().describe('Repository callsign, short name, or PHID'),
|
|
91
90
|
contains: z.string().optional().describe('Only branches containing this commit'),
|
|
91
|
+
patterns: z.array(z.string()).optional().describe('Filter branches by glob patterns'),
|
|
92
|
+
closed: z.boolean().optional().describe('Filter by open/closed status (Mercurial only)'),
|
|
92
93
|
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
93
94
|
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
94
95
|
}, async (params) => {
|
|
@@ -98,6 +99,9 @@ export function registerDiffusionTools(server, client) {
|
|
|
98
99
|
// List tags
|
|
99
100
|
server.tool('phabricator_tag_search', 'List tags in a Diffusion repository', {
|
|
100
101
|
repository: z.string().describe('Repository callsign, short name, or PHID'),
|
|
102
|
+
names: z.array(z.string()).optional().describe('Filter to specific tag names'),
|
|
103
|
+
commit: z.string().optional().describe('Show tags reachable from this commit'),
|
|
104
|
+
needMessages: z.boolean().optional().describe('Include tag messages in results'),
|
|
101
105
|
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
102
106
|
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
103
107
|
}, async (params) => {
|
|
@@ -109,6 +113,9 @@ export function registerDiffusionTools(server, client) {
|
|
|
109
113
|
path: z.string().describe('File path in the repository'),
|
|
110
114
|
repository: z.string().optional().describe('Repository callsign, short name, or PHID'),
|
|
111
115
|
commit: z.string().optional().describe('Commit hash or branch to start from (default: HEAD)'),
|
|
116
|
+
against: z.string().optional().describe('Compare against another commit'),
|
|
117
|
+
needDirectChanges: z.boolean().optional().describe('Include direct change info per path entry'),
|
|
118
|
+
needChildChanges: z.boolean().optional().describe('Include child change info per path entry'),
|
|
112
119
|
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
113
120
|
offset: z.coerce.number().optional().describe('Result offset for pagination'),
|
|
114
121
|
}, async (params) => {
|
|
@@ -134,4 +141,59 @@ export function registerDiffusionTools(server, client) {
|
|
|
134
141
|
});
|
|
135
142
|
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
136
143
|
});
|
|
144
|
+
// Create or edit a repository
|
|
145
|
+
server.tool('phabricator_repository_edit', 'Create or edit a Diffusion repository. To create, omit objectIdentifier and provide vcs + name.', {
|
|
146
|
+
objectIdentifier: z.string().optional().describe('Repository PHID, ID, callsign, or short name (omit to create new)'),
|
|
147
|
+
vcs: z.enum(['git', 'hg', 'svn']).optional().describe('Version control system (required for creation)'),
|
|
148
|
+
name: z.string().optional().describe('Repository name'),
|
|
149
|
+
callsign: z.string().optional().describe('Repository callsign (short uppercase identifier)'),
|
|
150
|
+
shortName: z.string().optional().describe('Repository short name (URL slug)'),
|
|
151
|
+
description: z.string().optional().describe('Repository description (Remarkup)'),
|
|
152
|
+
defaultBranch: z.string().optional().describe('Default branch name'),
|
|
153
|
+
status: z.enum(['active', 'inactive']).optional().describe('Repository status'),
|
|
154
|
+
addProjectPHIDs: z.array(z.string()).optional().describe('Project PHIDs to add'),
|
|
155
|
+
removeProjectPHIDs: z.array(z.string()).optional().describe('Project PHIDs to remove'),
|
|
156
|
+
space: z.string().optional().describe('Space PHID (for multi-space installations)'),
|
|
157
|
+
}, async (params) => {
|
|
158
|
+
const transactions = [];
|
|
159
|
+
if (params.vcs !== undefined) {
|
|
160
|
+
transactions.push({ type: 'vcs', value: params.vcs });
|
|
161
|
+
}
|
|
162
|
+
if (params.name !== undefined) {
|
|
163
|
+
transactions.push({ type: 'name', value: params.name });
|
|
164
|
+
}
|
|
165
|
+
if (params.callsign !== undefined) {
|
|
166
|
+
transactions.push({ type: 'callsign', value: params.callsign });
|
|
167
|
+
}
|
|
168
|
+
if (params.shortName !== undefined) {
|
|
169
|
+
transactions.push({ type: 'shortName', value: params.shortName });
|
|
170
|
+
}
|
|
171
|
+
if (params.description !== undefined) {
|
|
172
|
+
transactions.push({ type: 'description', value: params.description });
|
|
173
|
+
}
|
|
174
|
+
if (params.defaultBranch !== undefined) {
|
|
175
|
+
transactions.push({ type: 'defaultBranch', value: params.defaultBranch });
|
|
176
|
+
}
|
|
177
|
+
if (params.status !== undefined) {
|
|
178
|
+
transactions.push({ type: 'status', value: params.status });
|
|
179
|
+
}
|
|
180
|
+
if (params.addProjectPHIDs !== undefined) {
|
|
181
|
+
transactions.push({ type: 'projects.add', value: params.addProjectPHIDs });
|
|
182
|
+
}
|
|
183
|
+
if (params.removeProjectPHIDs !== undefined) {
|
|
184
|
+
transactions.push({ type: 'projects.remove', value: params.removeProjectPHIDs });
|
|
185
|
+
}
|
|
186
|
+
if (params.space !== undefined) {
|
|
187
|
+
transactions.push({ type: 'space', value: params.space });
|
|
188
|
+
}
|
|
189
|
+
if (transactions.length === 0) {
|
|
190
|
+
return { content: [{ type: 'text', text: 'No changes specified' }] };
|
|
191
|
+
}
|
|
192
|
+
const apiParams = { transactions };
|
|
193
|
+
if (params.objectIdentifier !== undefined) {
|
|
194
|
+
apiParams.objectIdentifier = params.objectIdentifier;
|
|
195
|
+
}
|
|
196
|
+
const result = await client.call('diffusion.repository.edit', apiParams);
|
|
197
|
+
return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
|
|
198
|
+
});
|
|
137
199
|
}
|
package/dist/tools/feed.js
CHANGED
|
@@ -3,7 +3,7 @@ export function registerFeedTools(server, client) {
|
|
|
3
3
|
// Query activity feed
|
|
4
4
|
server.tool('phabricator_feed_query', 'Query the Phabricator activity feed. Returns recent activity (task updates, revision changes, commits, etc.) as an object keyed by story PHID. Uses feed.query (the only Conduit method for feed data).', {
|
|
5
5
|
filterPHIDs: z.array(z.string()).optional().describe('Only show activity involving these PHIDs (user, project, task, etc.)'),
|
|
6
|
-
view: z.enum(['data', 'text', 'html']).optional().describe('Output format: "data" (structured, default), "text" (human-readable), "html" (rendered HTML)'),
|
|
6
|
+
view: z.enum(['data', 'text', 'html', 'html-summary']).optional().describe('Output format: "data" (structured, default), "text" (human-readable), "html" (rendered HTML), "html-summary" (title only)'),
|
|
7
7
|
limit: z.coerce.number().max(100).optional().describe('Maximum results (max 100)'),
|
|
8
8
|
after: z.string().optional().describe('Cursor for pagination (chronological key from previous results)'),
|
|
9
9
|
before: z.string().optional().describe('Cursor for reverse pagination'),
|
package/dist/tools/maniphest.js
CHANGED
|
@@ -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 parent tasks'),
|
|
25
|
-
hasSubtasks: z.boolean().optional().describe('Filter to tasks that have subtasks'),
|
|
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'),
|
|
26
26
|
spacePHIDs: z.array(z.string()).optional().describe('Filter by Space PHIDs (for multi-space installations)'),
|
|
27
27
|
})).optional().describe('Search constraints'),
|
|
28
28
|
attachments: jsonCoerce(z.object({
|
package/dist/tools/phriction.js
CHANGED
|
@@ -8,7 +8,8 @@ export function registerPhrictionTools(server, client) {
|
|
|
8
8
|
ids: z.array(z.coerce.number()).optional().describe('Document IDs'),
|
|
9
9
|
phids: z.array(z.string()).optional().describe('Document PHIDs'),
|
|
10
10
|
paths: z.array(z.string()).optional().describe('Document paths'),
|
|
11
|
-
|
|
11
|
+
parentPaths: z.array(z.string()).optional().describe('Parent paths (direct children only)'),
|
|
12
|
+
ancestorPaths: z.array(z.string()).optional().describe('Ancestor paths to search under (any depth)'),
|
|
12
13
|
statuses: z.array(z.string()).optional().describe('Document statuses'),
|
|
13
14
|
query: z.string().optional().describe('Full-text search query'),
|
|
14
15
|
})).optional().describe('Search constraints'),
|
package/package.json
CHANGED