greenline-works-mcp-server 0.2.1 → 0.3.0
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/constants.js +1 -1
- package/src/format.js +11 -0
- package/src/tools/cards.js +5 -5
- package/src/tools/comments.js +3 -3
- package/src/tools/tasks.js +5 -4
package/package.json
CHANGED
package/src/constants.js
CHANGED
package/src/format.js
CHANGED
|
@@ -11,6 +11,16 @@ const responseFormatField = z
|
|
|
11
11
|
.default(ResponseFormat.MARKDOWN)
|
|
12
12
|
.describe("Output format. 'markdown' (default) is human-readable; 'json' is the raw structured payload.");
|
|
13
13
|
|
|
14
|
+
// Card descriptions, comments and task text are stored as HTML by the Quill editor. Plain text
|
|
15
|
+
// collapses into a single unformatted paragraph and markdown is shown literally, so callers have to
|
|
16
|
+
// send real tags. The supported list is what the server's sanitizer actually preserves — verified
|
|
17
|
+
// against it; <code> and <pre> are excluded because it strips them today.
|
|
18
|
+
const RICH_TEXT_HELP =
|
|
19
|
+
'HTML, not markdown or plain text. Plain text renders as one unformatted paragraph and markdown ' +
|
|
20
|
+
'is shown literally. Wrap every paragraph in <p>. Supported: <p>, <strong>, <em>, <u>, <s>, ' +
|
|
21
|
+
'<a href>, <ul>/<ol> with <li> (nesting allowed), <h1>-<h3>, <blockquote>. Do not use <code> or ' +
|
|
22
|
+
'<pre> — the server strips them. Example: <p>Intro</p><ul><li>One</li><li>Two</li></ul>';
|
|
23
|
+
|
|
14
24
|
const toJsonString = value => JSON.stringify(value, null, 2);
|
|
15
25
|
|
|
16
26
|
// Caller passes the full rendered string and a `rerender(items)` callback so we can
|
|
@@ -34,6 +44,7 @@ const truncateIfNeeded = ({ items, rendered, rerender }) => {
|
|
|
34
44
|
};
|
|
35
45
|
|
|
36
46
|
module.exports = {
|
|
47
|
+
RICH_TEXT_HELP,
|
|
37
48
|
ResponseFormat,
|
|
38
49
|
responseFormatField,
|
|
39
50
|
toJsonString,
|
package/src/tools/cards.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { z } = require('zod');
|
|
2
2
|
const { makeApiRequest, safeRun } = require('../client');
|
|
3
|
-
const { responseFormatField, ResponseFormat, toJsonString, truncateIfNeeded } = require('../format');
|
|
3
|
+
const { responseFormatField, ResponseFormat, toJsonString, truncateIfNeeded, RICH_TEXT_HELP } = require('../format');
|
|
4
4
|
const { objectIdField, boardPublicIdField, pageField, countField, isoDateField } = require('../schemas');
|
|
5
5
|
|
|
6
6
|
const READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
|
|
@@ -44,7 +44,7 @@ const registerCardsTools = server => {
|
|
|
44
44
|
'Args:',
|
|
45
45
|
' - board (string, required): board publicId.',
|
|
46
46
|
' - title (string, required): card title.',
|
|
47
|
-
|
|
47
|
+
` - description (string, optional): ${RICH_TEXT_HELP}`,
|
|
48
48
|
' - column (string, optional): column ObjectId. If omitted, the card lands in the default backlog.',
|
|
49
49
|
' - owner (string, optional): account email of the assignee.',
|
|
50
50
|
' - label (string, optional): label name (e.g. "Enhancement"). Must match a label configured on the board.',
|
|
@@ -57,7 +57,7 @@ const registerCardsTools = server => {
|
|
|
57
57
|
inputSchema: {
|
|
58
58
|
board: boardPublicIdField,
|
|
59
59
|
title: z.string().min(1).max(500),
|
|
60
|
-
description: z.string().optional(),
|
|
60
|
+
description: z.string().optional().describe(RICH_TEXT_HELP),
|
|
61
61
|
column: objectIdField.optional(),
|
|
62
62
|
owner: z.string().optional(),
|
|
63
63
|
label: z.string().optional(),
|
|
@@ -227,7 +227,7 @@ const registerCardsTools = server => {
|
|
|
227
227
|
' - id (string, required): card ObjectId.',
|
|
228
228
|
' - board (string, optional): board publicId — required for mirror cards to disambiguate.',
|
|
229
229
|
' - title (string, optional)',
|
|
230
|
-
|
|
230
|
+
` - description (string, optional): ${RICH_TEXT_HELP}`,
|
|
231
231
|
' - owner (string, optional): account email or ObjectId.',
|
|
232
232
|
' - label (string, optional): label name (e.g. "Enhancement") or ObjectId.',
|
|
233
233
|
' - dueAt (string, optional): ISO date or datetime.',
|
|
@@ -242,7 +242,7 @@ const registerCardsTools = server => {
|
|
|
242
242
|
id: objectIdField,
|
|
243
243
|
board: boardPublicIdField.optional(),
|
|
244
244
|
title: z.string().min(1).max(500).optional(),
|
|
245
|
-
description: z.string().optional(),
|
|
245
|
+
description: z.string().optional().describe(RICH_TEXT_HELP),
|
|
246
246
|
owner: z.string().optional(),
|
|
247
247
|
label: z.string().optional(),
|
|
248
248
|
dueAt: isoDateField.optional(),
|
package/src/tools/comments.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { z } = require('zod');
|
|
2
2
|
const { makeApiRequest, safeRun } = require('../client');
|
|
3
|
-
const { responseFormatField, ResponseFormat, toJsonString, truncateIfNeeded } = require('../format');
|
|
3
|
+
const { responseFormatField, ResponseFormat, toJsonString, truncateIfNeeded, RICH_TEXT_HELP } = require('../format');
|
|
4
4
|
const { objectIdField } = require('../schemas');
|
|
5
5
|
|
|
6
6
|
const READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
|
|
@@ -23,14 +23,14 @@ const registerCommentsTools = server => {
|
|
|
23
23
|
'',
|
|
24
24
|
'Args:',
|
|
25
25
|
' - card (string, required): card ObjectId.',
|
|
26
|
-
|
|
26
|
+
` - text (string, required): the comment body. ${RICH_TEXT_HELP}`,
|
|
27
27
|
'',
|
|
28
28
|
'Examples:',
|
|
29
29
|
' - "Add a comment to card 670... saying: blocked on design review"',
|
|
30
30
|
].join('\n'),
|
|
31
31
|
inputSchema: {
|
|
32
32
|
card: objectIdField,
|
|
33
|
-
text: z.string().min(1).max(10000),
|
|
33
|
+
text: z.string().min(1).max(10000).describe(RICH_TEXT_HELP),
|
|
34
34
|
},
|
|
35
35
|
annotations: WRITE,
|
|
36
36
|
},
|
package/src/tools/tasks.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const { z } = require('zod');
|
|
2
2
|
const { makeApiRequest, safeRun } = require('../client');
|
|
3
3
|
const { isoDateField, objectIdField } = require('../schemas');
|
|
4
|
+
const { RICH_TEXT_HELP } = require('../format');
|
|
4
5
|
|
|
5
6
|
const WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true };
|
|
6
7
|
const IDEMPOTENT_WRITE = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true };
|
|
@@ -15,7 +16,7 @@ const registerTasksTools = server => {
|
|
|
15
16
|
'',
|
|
16
17
|
'Args:',
|
|
17
18
|
' - checklist (string, required): checklist ObjectId.',
|
|
18
|
-
|
|
19
|
+
` - description (string, required): the task text. ${RICH_TEXT_HELP}`,
|
|
19
20
|
' - position (number, optional, ≥0): if omitted, the task is appended.',
|
|
20
21
|
' - dueAt (string, optional): ISO date.',
|
|
21
22
|
' - owner (string, optional): account ObjectId or email.',
|
|
@@ -25,7 +26,7 @@ const registerTasksTools = server => {
|
|
|
25
26
|
].join('\n'),
|
|
26
27
|
inputSchema: {
|
|
27
28
|
checklist: objectIdField,
|
|
28
|
-
description: z.string().min(1).max(2000),
|
|
29
|
+
description: z.string().min(1).max(2000).describe(RICH_TEXT_HELP),
|
|
29
30
|
position: z.number().int().min(0).optional(),
|
|
30
31
|
dueAt: isoDateField.optional(),
|
|
31
32
|
owner: z.string().optional(),
|
|
@@ -55,7 +56,7 @@ const registerTasksTools = server => {
|
|
|
55
56
|
'',
|
|
56
57
|
'Args:',
|
|
57
58
|
' - id (string, required): task ObjectId.',
|
|
58
|
-
|
|
59
|
+
` - description (string, optional): ${RICH_TEXT_HELP}`,
|
|
59
60
|
' - completed (boolean, optional)',
|
|
60
61
|
' - completedOn (string, optional): ISO date — only honoured when completed=true.',
|
|
61
62
|
' - dueAt (string, optional): ISO date.',
|
|
@@ -68,7 +69,7 @@ const registerTasksTools = server => {
|
|
|
68
69
|
].join('\n'),
|
|
69
70
|
inputSchema: {
|
|
70
71
|
id: objectIdField,
|
|
71
|
-
description: z.string().min(1).max(2000).optional(),
|
|
72
|
+
description: z.string().min(1).max(2000).optional().describe(RICH_TEXT_HELP),
|
|
72
73
|
completed: z.boolean().optional(),
|
|
73
74
|
completedOn: isoDateField.optional(),
|
|
74
75
|
dueAt: isoDateField.optional(),
|