greenline-works-mcp-server 0.3.4 → 0.3.5
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/package.json +1 -1
- package/src/client.js +4 -0
- package/src/tools/cards.js +9 -3
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -71,6 +71,10 @@ const makeApiRequest = async (endpoint, { method = 'GET', body, query } = {}) =>
|
|
|
71
71
|
headers: {
|
|
72
72
|
'Content-Type': 'application/json',
|
|
73
73
|
Accept: 'application/json',
|
|
74
|
+
// Declares this traffic as MCP-originated so org admins' MCP access controls apply to
|
|
75
|
+
// API-key connections too (the backend gates and audits on it). Presence-only signal —
|
|
76
|
+
// the value is never trusted upstream.
|
|
77
|
+
'X-MCP-Client': 'mcp-server',
|
|
74
78
|
},
|
|
75
79
|
};
|
|
76
80
|
// A multi-tenant host may bind an OAuth bearer token instead of an accessId/secret pair
|
package/src/tools/cards.js
CHANGED
|
@@ -8,7 +8,7 @@ const READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true,
|
|
|
8
8
|
const WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true };
|
|
9
9
|
const IDEMPOTENT_WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true };
|
|
10
10
|
|
|
11
|
-
//
|
|
11
|
+
// Card fields arrive nested under CardItem. Older search responses were flat — handle both.
|
|
12
12
|
const renderCardLine = card => {
|
|
13
13
|
const c = (card && card.CardItem) || card || {};
|
|
14
14
|
const id = (card && card._id) || c._id;
|
|
@@ -234,11 +234,15 @@ const registerCardsTools = server => {
|
|
|
234
234
|
' - owner (string, optional): account email or ObjectId.',
|
|
235
235
|
' - label (string, optional): label name (e.g. "Enhancement") or ObjectId.',
|
|
236
236
|
' - dueAt (string, optional): ISO date or datetime.',
|
|
237
|
+
' - blocked (boolean, optional): true blocks the card, false unblocks it. Unblocking also clears the block reason.',
|
|
238
|
+
' - blockedReason (string, optional): why the card is blocked. Pair it with blocked: true.',
|
|
237
239
|
' - customFields (array, optional): list of { label, value } pairs. `label` matches the custom-field name configured on the board.',
|
|
238
240
|
'',
|
|
239
241
|
'Examples:',
|
|
240
242
|
' - "Reassign card 670... to bob@example.com"',
|
|
241
243
|
' - "Set the due date on card 670... to 2025-06-01"',
|
|
244
|
+
' - "Block card 670... because we are waiting on the vendor"',
|
|
245
|
+
' - "Unblock card 670..."',
|
|
242
246
|
' - "Set the Project Code custom field on card 670... to ABC-123"',
|
|
243
247
|
].join('\n'),
|
|
244
248
|
inputSchema: {
|
|
@@ -249,6 +253,8 @@ const registerCardsTools = server => {
|
|
|
249
253
|
owner: z.string().optional(),
|
|
250
254
|
label: z.string().optional(),
|
|
251
255
|
dueAt: isoDateField.optional(),
|
|
256
|
+
blocked: z.boolean().optional(),
|
|
257
|
+
blockedReason: z.string().max(2000).optional(),
|
|
252
258
|
customFields: z
|
|
253
259
|
.array(
|
|
254
260
|
z.object({
|
|
@@ -401,8 +407,8 @@ const registerCardsTools = server => {
|
|
|
401
407
|
'Results are sorted by relevance (best match first).',
|
|
402
408
|
'',
|
|
403
409
|
'Mirror cards: results are returned per (card, board) pair — a card mirrored to two',
|
|
404
|
-
'boards that matches the query appears twice, each with that board\'s
|
|
405
|
-
'owner, and watchers. Use the returned
|
|
410
|
+
'boards that matches the query appears twice, each with that board\'s column, label,',
|
|
411
|
+
'owner, and watchers. Use the returned CardItem.boardPublicId to know which board to act on.',
|
|
406
412
|
'',
|
|
407
413
|
'Args:',
|
|
408
414
|
' - q (string, required): search text, minimum 2 characters.',
|