@brxce/mcp-server 1.0.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/README.md +220 -0
- package/dist/config/environment.d.ts +8 -0
- package/dist/config/environment.d.ts.map +1 -0
- package/dist/config/environment.js +16 -0
- package/dist/config/environment.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +167 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/worknode-prompts.d.ts +7 -0
- package/dist/prompts/worknode-prompts.d.ts.map +1 -0
- package/dist/prompts/worknode-prompts.js +369 -0
- package/dist/prompts/worknode-prompts.js.map +1 -0
- package/dist/prompts/workspace-context-prompt.d.ts +4 -0
- package/dist/prompts/workspace-context-prompt.d.ts.map +1 -0
- package/dist/prompts/workspace-context-prompt.js +101 -0
- package/dist/prompts/workspace-context-prompt.js.map +1 -0
- package/dist/resources/user-resource.d.ts +4 -0
- package/dist/resources/user-resource.d.ts.map +1 -0
- package/dist/resources/user-resource.js +40 -0
- package/dist/resources/user-resource.js.map +1 -0
- package/dist/resources/workspace-members-resource.d.ts +4 -0
- package/dist/resources/workspace-members-resource.d.ts.map +1 -0
- package/dist/resources/workspace-members-resource.js +39 -0
- package/dist/resources/workspace-members-resource.js.map +1 -0
- package/dist/resources/workspace-resource.d.ts +4 -0
- package/dist/resources/workspace-resource.d.ts.map +1 -0
- package/dist/resources/workspace-resource.js +27 -0
- package/dist/resources/workspace-resource.js.map +1 -0
- package/dist/services/api-client.d.ts +17 -0
- package/dist/services/api-client.d.ts.map +1 -0
- package/dist/services/api-client.js +118 -0
- package/dist/services/api-client.js.map +1 -0
- package/dist/tools/meeting-agenda-tool.d.ts +7 -0
- package/dist/tools/meeting-agenda-tool.d.ts.map +1 -0
- package/dist/tools/meeting-agenda-tool.js +452 -0
- package/dist/tools/meeting-agenda-tool.js.map +1 -0
- package/dist/tools/meeting-create-tool.d.ts +8 -0
- package/dist/tools/meeting-create-tool.d.ts.map +1 -0
- package/dist/tools/meeting-create-tool.js +309 -0
- package/dist/tools/meeting-create-tool.js.map +1 -0
- package/dist/tools/meeting-decisions-tool.d.ts +7 -0
- package/dist/tools/meeting-decisions-tool.d.ts.map +1 -0
- package/dist/tools/meeting-decisions-tool.js +431 -0
- package/dist/tools/meeting-decisions-tool.js.map +1 -0
- package/dist/tools/meeting-list-tool.d.ts +7 -0
- package/dist/tools/meeting-list-tool.d.ts.map +1 -0
- package/dist/tools/meeting-list-tool.js +305 -0
- package/dist/tools/meeting-list-tool.js.map +1 -0
- package/dist/tools/meeting-notes-tool.d.ts +7 -0
- package/dist/tools/meeting-notes-tool.d.ts.map +1 -0
- package/dist/tools/meeting-notes-tool.js +318 -0
- package/dist/tools/meeting-notes-tool.js.map +1 -0
- package/dist/tools/meeting-update-tool.d.ts +7 -0
- package/dist/tools/meeting-update-tool.d.ts.map +1 -0
- package/dist/tools/meeting-update-tool.js +310 -0
- package/dist/tools/meeting-update-tool.js.map +1 -0
- package/dist/tools/tag-category-tool.d.ts +4 -0
- package/dist/tools/tag-category-tool.d.ts.map +1 -0
- package/dist/tools/tag-category-tool.js +293 -0
- package/dist/tools/tag-category-tool.js.map +1 -0
- package/dist/tools/tag-search-tool.d.ts +4 -0
- package/dist/tools/tag-search-tool.d.ts.map +1 -0
- package/dist/tools/tag-search-tool.js +358 -0
- package/dist/tools/tag-search-tool.js.map +1 -0
- package/dist/tools/tag-tool.d.ts +4 -0
- package/dist/tools/tag-tool.d.ts.map +1 -0
- package/dist/tools/tag-tool.js +450 -0
- package/dist/tools/tag-tool.js.map +1 -0
- package/dist/tools/worknode-archive-tool.d.ts +7 -0
- package/dist/tools/worknode-archive-tool.d.ts.map +1 -0
- package/dist/tools/worknode-archive-tool.js +163 -0
- package/dist/tools/worknode-archive-tool.js.map +1 -0
- package/dist/tools/worknode-create-tool.d.ts +4 -0
- package/dist/tools/worknode-create-tool.d.ts.map +1 -0
- package/dist/tools/worknode-create-tool.js +382 -0
- package/dist/tools/worknode-create-tool.js.map +1 -0
- package/dist/tools/worknode-my-work-tool.d.ts +8 -0
- package/dist/tools/worknode-my-work-tool.d.ts.map +1 -0
- package/dist/tools/worknode-my-work-tool.js +302 -0
- package/dist/tools/worknode-my-work-tool.js.map +1 -0
- package/dist/tools/worknode-search-tool.d.ts +4 -0
- package/dist/tools/worknode-search-tool.d.ts.map +1 -0
- package/dist/tools/worknode-search-tool.js +289 -0
- package/dist/tools/worknode-search-tool.js.map +1 -0
- package/dist/tools/worknode-subtree-tool.d.ts +4 -0
- package/dist/tools/worknode-subtree-tool.d.ts.map +1 -0
- package/dist/tools/worknode-subtree-tool.js +175 -0
- package/dist/tools/worknode-subtree-tool.js.map +1 -0
- package/dist/tools/worknode-tag-tool.d.ts +4 -0
- package/dist/tools/worknode-tag-tool.d.ts.map +1 -0
- package/dist/tools/worknode-tag-tool.js +353 -0
- package/dist/tools/worknode-tag-tool.js.map +1 -0
- package/dist/tools/worknode-update-tool.d.ts +4 -0
- package/dist/tools/worknode-update-tool.d.ts.map +1 -0
- package/dist/tools/worknode-update-tool.js +409 -0
- package/dist/tools/worknode-update-tool.js.map +1 -0
- package/dist/tools/workspace-inbox-tool.d.ts +8 -0
- package/dist/tools/workspace-inbox-tool.d.ts.map +1 -0
- package/dist/tools/workspace-inbox-tool.js +210 -0
- package/dist/tools/workspace-inbox-tool.js.map +1 -0
- package/dist/tools/workspace-tree-tool.d.ts +4 -0
- package/dist/tools/workspace-tree-tool.d.ts.map +1 -0
- package/dist/tools/workspace-tree-tool.js +419 -0
- package/dist/tools/workspace-tree-tool.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Transforms a full WorkNode object to a minimal version for token efficiency
|
|
4
|
+
*/
|
|
5
|
+
function toMinimalWorkNode(node) {
|
|
6
|
+
return {
|
|
7
|
+
id: node.id,
|
|
8
|
+
parentNodeId: node.parentNodeId,
|
|
9
|
+
workspaceId: node.workspaceId,
|
|
10
|
+
nodeType: node.nodeType,
|
|
11
|
+
nodeLevel: node.nodeLevel,
|
|
12
|
+
nodePath: node.nodePath,
|
|
13
|
+
title: node.title,
|
|
14
|
+
description: node.description,
|
|
15
|
+
status: node.status,
|
|
16
|
+
priority: node.priority,
|
|
17
|
+
dueDate: node.dueDate,
|
|
18
|
+
assignee: node.assignee,
|
|
19
|
+
createdBy: node.createdBy,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export function registerWorknodeSubtreeTool(server, apiClient) {
|
|
23
|
+
server.registerTool('brxce_worknode_subtree', {
|
|
24
|
+
description: `Get a specific WorkNode and all its descendants (subtree).
|
|
25
|
+
|
|
26
|
+
⚠️ **CRITICAL: WorkNode Context Verification Required**
|
|
27
|
+
Before calling this tool, you MUST:
|
|
28
|
+
1. Use \`brxce_workspace_overview\` first to find the node ID within a workspace
|
|
29
|
+
2. NEVER use arbitrary or guessed nodeId values
|
|
30
|
+
3. Verify the node exists in the workspace tree before drilling down
|
|
31
|
+
4. If user mentions a node by name, search the workspace tree first
|
|
32
|
+
|
|
33
|
+
**Example Workflow:**
|
|
34
|
+
\`\`\`
|
|
35
|
+
User: "Show me what's under the MVP Development project"
|
|
36
|
+
LLM:
|
|
37
|
+
1. Calls brxce_workspace_overview to get workspace tree
|
|
38
|
+
2. Finds "MVP Development" project with ID 856
|
|
39
|
+
3. Calls brxce_worknode_subtree with nodeId: 856
|
|
40
|
+
4. Shows subtree results
|
|
41
|
+
\`\`\`
|
|
42
|
+
|
|
43
|
+
This tool retrieves a single WorkNode and ALL its child nodes recursively, providing:
|
|
44
|
+
- The target node details
|
|
45
|
+
- Complete list of all descendants (children, grandchildren, etc.)
|
|
46
|
+
- Hierarchical statistics for the subtree
|
|
47
|
+
- Progress and completion tracking for the entire branch
|
|
48
|
+
|
|
49
|
+
**When to use this tool:**
|
|
50
|
+
- When user asks about a specific goal, project, or task
|
|
51
|
+
- To understand the scope and breakdown of work under a node
|
|
52
|
+
- To analyze completion status of a specific initiative
|
|
53
|
+
- To see all sub-tasks under a particular task
|
|
54
|
+
- When you need detailed context about a node's children
|
|
55
|
+
|
|
56
|
+
**Use cases:**
|
|
57
|
+
- "What's under project X?" → Use this with project X's ID
|
|
58
|
+
- "Show me all tasks in goal Y" → Use this with goal Y's ID
|
|
59
|
+
- "What are the sub-tasks of task Z?" → Use this with task Z's ID
|
|
60
|
+
- "How is project ABC broken down?" → Use this with project ABC's ID
|
|
61
|
+
|
|
62
|
+
**Default behavior:**
|
|
63
|
+
- Returns the target node + all active descendants
|
|
64
|
+
- Excludes completed and deleted items by default
|
|
65
|
+
- Use filters to include completed work or limit depth
|
|
66
|
+
|
|
67
|
+
**Compact Mode (Token Efficiency):**
|
|
68
|
+
- When \`compact=true\`, returns only essential fields: id, title, nodeType, status, priority, parentNodeId, nodeLevel, workspaceId
|
|
69
|
+
- When \`compact=false\` or omitted, returns all fields including: description, assignee, progress, dueDate, completedAt, tags (simplified: name, slug, color), etc.
|
|
70
|
+
- **Achieves ~75% size reduction** (e.g., 25KB → 5.8KB for 26 descendants)
|
|
71
|
+
- Use compact mode when you only need basic hierarchy and don't need detailed metadata
|
|
72
|
+
|
|
73
|
+
⏰ **TIMEZONE HANDLING:**
|
|
74
|
+
ALL date/time fields in the response are in UTC (ISO 8601 format):
|
|
75
|
+
- completedAt, createdAt, updatedAt, dueDate, startDate
|
|
76
|
+
|
|
77
|
+
When presenting results to the user, you MUST convert UTC timestamps to the user's local timezone:
|
|
78
|
+
1. Check the current date/time from the <env> tag in the system prompt
|
|
79
|
+
2. Identify the user's timezone (e.g., Asia/Seoul = UTC+9)
|
|
80
|
+
3. Convert ALL displayed timestamps from UTC to local time
|
|
81
|
+
4. Format dates in a user-friendly way (e.g., "오후 5:16" not "08:16 UTC")
|
|
82
|
+
|
|
83
|
+
Example conversion (Korea Time, UTC+9):
|
|
84
|
+
- API returns: "completedAt": "2025-10-20T08:16:25.556Z" (UTC)
|
|
85
|
+
- Display to user: "완료: 2025-10-20 오후 5:16" (KST)
|
|
86
|
+
|
|
87
|
+
**Tip:** First use brxce_workspace_overview to find the node ID, then use this tool to drill into that specific node's subtree.`,
|
|
88
|
+
inputSchema: {
|
|
89
|
+
nodeId: z.number().describe('The WorkNode ID to fetch subtree for'),
|
|
90
|
+
includeCompleted: z.boolean().optional().describe('Include completed descendants (default: false)'),
|
|
91
|
+
includeCancelled: z.boolean().optional().describe('Include cancelled descendants (default: false)'),
|
|
92
|
+
includeAll: z
|
|
93
|
+
.boolean()
|
|
94
|
+
.optional()
|
|
95
|
+
.describe('Include all statuses including completed and cancelled (overrides other flags)'),
|
|
96
|
+
includeArchived: z.boolean().optional().describe('Include archived descendants (default: false)'),
|
|
97
|
+
includeDeleted: z.boolean().optional().describe('Include soft-deleted descendants (default: false)'),
|
|
98
|
+
maxDepth: z
|
|
99
|
+
.number()
|
|
100
|
+
.optional()
|
|
101
|
+
.describe('Maximum depth to traverse from target node (default: unlimited)'),
|
|
102
|
+
compact: z.boolean().optional().describe('Return compact format (minimal fields for token efficiency, ~75% size reduction, default: false)'),
|
|
103
|
+
},
|
|
104
|
+
}, async (args) => {
|
|
105
|
+
const { nodeId, ...filters } = args;
|
|
106
|
+
if (!nodeId || typeof nodeId !== 'number') {
|
|
107
|
+
throw new Error('nodeId is required and must be a number');
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
// Build query string
|
|
111
|
+
const queryParams = new URLSearchParams();
|
|
112
|
+
for (const [key, value] of Object.entries(filters)) {
|
|
113
|
+
if (value !== undefined && value !== null) {
|
|
114
|
+
queryParams.append(key, String(value));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const queryString = queryParams.toString();
|
|
118
|
+
const url = `/mcp/worknodes/${nodeId}/subtree${queryString ? `?${queryString}` : ''}`;
|
|
119
|
+
const response = await apiClient.get(url);
|
|
120
|
+
if (!response.success) {
|
|
121
|
+
throw new Error('Failed to fetch worknode subtree');
|
|
122
|
+
}
|
|
123
|
+
// Use backend's compact mode if requested, otherwise return full data
|
|
124
|
+
const isCompact = response.data.compact || false;
|
|
125
|
+
const nodeData = response.data.node;
|
|
126
|
+
const childrenData = response.data.children;
|
|
127
|
+
return {
|
|
128
|
+
content: [
|
|
129
|
+
{
|
|
130
|
+
type: 'text',
|
|
131
|
+
text: JSON.stringify({
|
|
132
|
+
node: nodeData,
|
|
133
|
+
children: childrenData,
|
|
134
|
+
statistics: response.data.stats,
|
|
135
|
+
compact: isCompact,
|
|
136
|
+
metadata: response.meta,
|
|
137
|
+
}, null, 2),
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
// Handle 404 specially
|
|
144
|
+
if (error.response?.status === 404 || error.message?.includes('not found')) {
|
|
145
|
+
return {
|
|
146
|
+
content: [
|
|
147
|
+
{
|
|
148
|
+
type: 'text',
|
|
149
|
+
text: JSON.stringify({
|
|
150
|
+
error: 'WorkNode not found',
|
|
151
|
+
message: `WorkNode with ID ${nodeId} does not exist or you don't have access to it.`,
|
|
152
|
+
nodeId,
|
|
153
|
+
}),
|
|
154
|
+
},
|
|
155
|
+
],
|
|
156
|
+
isError: true,
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
return {
|
|
160
|
+
content: [
|
|
161
|
+
{
|
|
162
|
+
type: 'text',
|
|
163
|
+
text: JSON.stringify({
|
|
164
|
+
error: 'Failed to fetch worknode subtree',
|
|
165
|
+
message: error.message,
|
|
166
|
+
nodeId,
|
|
167
|
+
}),
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
isError: true,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=worknode-subtree-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worknode-subtree-tool.js","sourceRoot":"","sources":["../../src/tools/wor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C,OAAO,EAAE,KAAK,CAAC,OAAO;4BACtB,MAAM;yBACP,CAAC;qBACH;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { ApiClient } from '../services/api-client.js';
|
|
3
|
+
export declare function registerWorknodeTagTools(server: McpServer, apiClient: ApiClient): void;
|
|
4
|
+
//# sourceMappingURL=worknode-tag-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worknode-tag-tool.d.ts","sourceRoot":"","sources":["../../src/tools/worknode-tag-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,QAmd/E"}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export function registerWorknodeTagTools(server, apiClient) {
|
|
3
|
+
/**
|
|
4
|
+
* Add tags to WorkNode
|
|
5
|
+
*/
|
|
6
|
+
server.registerTool('brxce_add_tags_to_worknode', {
|
|
7
|
+
description: `Add one or more tags to a WorkNode.
|
|
8
|
+
|
|
9
|
+
**When to use:**
|
|
10
|
+
- When user mentions tags for a specific WorkNode
|
|
11
|
+
- To organize and categorize work items
|
|
12
|
+
- After creating a WorkNode, to add relevant tags
|
|
13
|
+
|
|
14
|
+
**Constraints:**
|
|
15
|
+
- If category doesn't allow multiple tags, can only add one per category
|
|
16
|
+
- If category is required, WorkNode must have at least one tag from that category
|
|
17
|
+
|
|
18
|
+
**Example scenarios:**
|
|
19
|
+
User: "Tag task #142 with React and TypeScript"
|
|
20
|
+
Assistant: Get tag IDs for React and TypeScript, then call:
|
|
21
|
+
brxce_add_tags_to_worknode(workspaceId: 4, worknodeId: 142, tagIds: [25, 26])
|
|
22
|
+
|
|
23
|
+
User: "This is a high priority backend task"
|
|
24
|
+
Assistant: Add "high-priority" and "backend" tags
|
|
25
|
+
|
|
26
|
+
**Returns:**
|
|
27
|
+
- Number of tags added
|
|
28
|
+
- Number skipped (if already tagged)
|
|
29
|
+
- List of all current tags on the WorkNode`,
|
|
30
|
+
inputSchema: {
|
|
31
|
+
workspaceId: z.number().describe('The workspace ID'),
|
|
32
|
+
worknodeId: z.number().describe('WorkNode ID to add tags to'),
|
|
33
|
+
tagIds: z.array(z.number()).describe('Array of tag IDs to add')
|
|
34
|
+
}
|
|
35
|
+
}, async (args) => {
|
|
36
|
+
try {
|
|
37
|
+
const { workspaceId, worknodeId, tagIds } = args;
|
|
38
|
+
const url = `/mcp/workspaces/${workspaceId}/worknodes/${worknodeId}/tags`;
|
|
39
|
+
const response = await apiClient.post(url, { tagIds });
|
|
40
|
+
if (!response.success) {
|
|
41
|
+
return {
|
|
42
|
+
content: [
|
|
43
|
+
{
|
|
44
|
+
type: 'text',
|
|
45
|
+
text: `Failed to add tags: ${response.message || 'Unknown error'}`,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
const { added, skipped, tags } = response.data;
|
|
51
|
+
let resultText = `Tags added to WorkNode #${worknodeId}:\\n\\n`;
|
|
52
|
+
resultText += `Added: ${added} tag(s)\\n`;
|
|
53
|
+
if (skipped > 0)
|
|
54
|
+
resultText += `Skipped: ${skipped} (already tagged)\\n`;
|
|
55
|
+
resultText += `\\n**Current tags:**\\n`;
|
|
56
|
+
// Group by category
|
|
57
|
+
const byCategory = tags.reduce((acc, wnt) => {
|
|
58
|
+
const catName = wnt.tag.category.name;
|
|
59
|
+
if (!acc[catName])
|
|
60
|
+
acc[catName] = [];
|
|
61
|
+
acc[catName].push(wnt.tag.name);
|
|
62
|
+
return acc;
|
|
63
|
+
}, {});
|
|
64
|
+
Object.entries(byCategory).forEach(([catName, tagNames]) => {
|
|
65
|
+
resultText += `- ${catName}: ${tagNames.join(', ')}\\n`;
|
|
66
|
+
});
|
|
67
|
+
return {
|
|
68
|
+
content: [
|
|
69
|
+
{
|
|
70
|
+
type: 'text',
|
|
71
|
+
text: resultText,
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
catch (error) {
|
|
77
|
+
return {
|
|
78
|
+
content: [
|
|
79
|
+
{
|
|
80
|
+
type: 'text',
|
|
81
|
+
text: `Error adding tags: ${error.message || 'Unknown error'}`,
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
/**
|
|
88
|
+
* Get WorkNode tags
|
|
89
|
+
*/
|
|
90
|
+
server.registerTool('brxce_get_worknode_tags', {
|
|
91
|
+
description: `Get all tags attached to a WorkNode.
|
|
92
|
+
|
|
93
|
+
**When to use:**
|
|
94
|
+
- To check what tags a WorkNode currently has
|
|
95
|
+
- Before adding more tags (to avoid duplicates)
|
|
96
|
+
- To understand WorkNode's categorization
|
|
97
|
+
|
|
98
|
+
**Returns:**
|
|
99
|
+
- All tags grouped by category
|
|
100
|
+
- Tag details (name, slug, category)
|
|
101
|
+
- Who added each tag and when
|
|
102
|
+
|
|
103
|
+
**Example:**
|
|
104
|
+
User: "What tags does task #142 have?"
|
|
105
|
+
Assistant calls: brxce_get_worknode_tags(workspaceId: 4, worknodeId: 142)`,
|
|
106
|
+
inputSchema: {
|
|
107
|
+
workspaceId: z.number().describe('The workspace ID'),
|
|
108
|
+
worknodeId: z.number().describe('WorkNode ID')
|
|
109
|
+
}
|
|
110
|
+
}, async (args) => {
|
|
111
|
+
try {
|
|
112
|
+
const { workspaceId, worknodeId } = args;
|
|
113
|
+
const url = `/mcp/workspaces/${workspaceId}/worknodes/${worknodeId}/tags`;
|
|
114
|
+
const response = await apiClient.get(url);
|
|
115
|
+
if (!response.success) {
|
|
116
|
+
return {
|
|
117
|
+
content: [
|
|
118
|
+
{
|
|
119
|
+
type: 'text',
|
|
120
|
+
text: `Failed to get tags: ${response.message || 'Unknown error'}`,
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
const { tags, total } = response.data;
|
|
126
|
+
let resultText = `## Tags for WorkNode #${worknodeId}\\n\\n`;
|
|
127
|
+
resultText += `Total tags: ${total}\\n\\n`;
|
|
128
|
+
if (tags.length === 0) {
|
|
129
|
+
resultText += `No tags attached.\\n`;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
// Group by category
|
|
133
|
+
const byCategory = tags.reduce((acc, wnt) => {
|
|
134
|
+
const catName = wnt.tag.category.name;
|
|
135
|
+
if (!acc[catName])
|
|
136
|
+
acc[catName] = [];
|
|
137
|
+
acc[catName].push(wnt);
|
|
138
|
+
return acc;
|
|
139
|
+
}, {});
|
|
140
|
+
Object.entries(byCategory).forEach(([catName, catTags]) => {
|
|
141
|
+
resultText += `### ${catName}\\n`;
|
|
142
|
+
catTags.forEach((wnt) => {
|
|
143
|
+
resultText += `- **${wnt.tag.name}** (ID: ${wnt.tag.id})\\n`;
|
|
144
|
+
if (wnt.tag.description)
|
|
145
|
+
resultText += ` ${wnt.tag.description}\\n`;
|
|
146
|
+
if (wnt.tag.parentTag)
|
|
147
|
+
resultText += ` Parent: ${wnt.tag.parentTag.name}\\n`;
|
|
148
|
+
const addedDate = new Date(wnt.addedAt).toISOString().split('T')[0];
|
|
149
|
+
resultText += ` Added: ${addedDate}`;
|
|
150
|
+
if (wnt.user)
|
|
151
|
+
resultText += ` by ${wnt.user.name || wnt.user.email}`;
|
|
152
|
+
resultText += `\\n`;
|
|
153
|
+
});
|
|
154
|
+
resultText += `\\n`;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
return {
|
|
158
|
+
content: [
|
|
159
|
+
{
|
|
160
|
+
type: 'text',
|
|
161
|
+
text: resultText,
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
return {
|
|
168
|
+
content: [
|
|
169
|
+
{
|
|
170
|
+
type: 'text',
|
|
171
|
+
text: `Error getting tags: ${error.message || 'Unknown error'}`,
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
/**
|
|
178
|
+
* Batch assign tags to multiple WorkNodes
|
|
179
|
+
*/
|
|
180
|
+
server.registerTool('brxce_batch_assign_tags', {
|
|
181
|
+
description: `Assign one or more tags to multiple WorkNodes in a single operation.
|
|
182
|
+
|
|
183
|
+
**When to use:**
|
|
184
|
+
- When tagging multiple WorkNodes with the same tag(s)
|
|
185
|
+
- Organizing a group of related work items
|
|
186
|
+
- Applying sprint/release tags to multiple tasks
|
|
187
|
+
|
|
188
|
+
**Efficiency:**
|
|
189
|
+
- Single API call instead of N × M calls
|
|
190
|
+
- Optimized for large-scale tagging operations
|
|
191
|
+
- Automatic handling of duplicates and constraints
|
|
192
|
+
|
|
193
|
+
**Example scenarios:**
|
|
194
|
+
|
|
195
|
+
1. Sprint tagging:
|
|
196
|
+
User: "Tag all tasks in Sprint-42 with the sprint tag"
|
|
197
|
+
Assistant: Get task IDs and sprint tag ID, then call:
|
|
198
|
+
brxce_batch_assign_tags(
|
|
199
|
+
workspaceId: 4,
|
|
200
|
+
worknodeIds: [100, 101, 102, 103],
|
|
201
|
+
tagIds: [42]
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
2. Multi-tag assignment:
|
|
205
|
+
User: "Add Backend and High-Priority tags to these 5 tasks"
|
|
206
|
+
Assistant:
|
|
207
|
+
brxce_batch_assign_tags(
|
|
208
|
+
workspaceId: 4,
|
|
209
|
+
worknodeIds: [200, 201, 202, 203, 204],
|
|
210
|
+
tagIds: [10, 20] // Backend, High-Priority
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
3. Technology stack tagging:
|
|
214
|
+
User: "Tag all React components with React and TypeScript"
|
|
215
|
+
Assistant: Search for React components, get tag IDs, then batch assign
|
|
216
|
+
|
|
217
|
+
**Returns:**
|
|
218
|
+
- Total WorkNodes and tags involved
|
|
219
|
+
- Number of assignments added, skipped, and failed
|
|
220
|
+
- Detailed failure reasons (category constraints, etc.)
|
|
221
|
+
|
|
222
|
+
**Constraints handled:**
|
|
223
|
+
- Category allowMultiple restrictions
|
|
224
|
+
- Duplicate tag prevention (auto-skip)
|
|
225
|
+
- Workspace and WorkNode validation
|
|
226
|
+
|
|
227
|
+
**Best practices:**
|
|
228
|
+
1. Use this when tagging 2+ WorkNodes
|
|
229
|
+
2. Combine with brxce_search_tags to find tag IDs
|
|
230
|
+
3. Combine with brxce_workspace_tree to find WorkNode IDs
|
|
231
|
+
4. Review failed assignments if category constraints exist`,
|
|
232
|
+
inputSchema: {
|
|
233
|
+
workspaceId: z.number().describe('The workspace ID'),
|
|
234
|
+
worknodeIds: z
|
|
235
|
+
.array(z.number())
|
|
236
|
+
.describe('Array of WorkNode IDs to add tags to'),
|
|
237
|
+
tagIds: z
|
|
238
|
+
.array(z.number())
|
|
239
|
+
.describe('Array of tag IDs to add to each WorkNode')
|
|
240
|
+
}
|
|
241
|
+
}, async (args) => {
|
|
242
|
+
try {
|
|
243
|
+
const { workspaceId, worknodeIds, tagIds } = args;
|
|
244
|
+
const url = `/mcp/workspaces/${workspaceId}/tags/batch-assign`;
|
|
245
|
+
const response = await apiClient.post(url, { worknodeIds, tagIds });
|
|
246
|
+
if (!response.success) {
|
|
247
|
+
return {
|
|
248
|
+
content: [
|
|
249
|
+
{
|
|
250
|
+
type: 'text',
|
|
251
|
+
text: `Failed to batch assign tags: ${response.message || 'Unknown error'}`,
|
|
252
|
+
},
|
|
253
|
+
],
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
const { totalWorknodes, totalTags, totalAssignments, added, skipped, failed } = response.data;
|
|
257
|
+
let resultText = `## Batch Tag Assignment Results\\n\\n`;
|
|
258
|
+
resultText += `**Summary:**\\n`;
|
|
259
|
+
resultText += `- WorkNodes: ${totalWorknodes}\\n`;
|
|
260
|
+
resultText += `- Tags: ${totalTags}\\n`;
|
|
261
|
+
resultText += `- Total assignments attempted: ${totalAssignments}\\n`;
|
|
262
|
+
resultText += `- ✅ Added: ${added}\\n`;
|
|
263
|
+
resultText += `- ⏭️ Skipped (duplicates): ${skipped}\\n`;
|
|
264
|
+
resultText += `- ❌ Failed: ${failed.length}\\n\\n`;
|
|
265
|
+
if (failed.length > 0) {
|
|
266
|
+
resultText += `**Failures:**\\n`;
|
|
267
|
+
failed.forEach((f) => {
|
|
268
|
+
resultText += `- WorkNode #${f.worknodeId}, Tag #${f.tagId}: ${f.reason}\\n`;
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
if (added > 0) {
|
|
272
|
+
resultText += `\\n✅ Successfully assigned ${added} tag-worknode relationships!`;
|
|
273
|
+
}
|
|
274
|
+
return {
|
|
275
|
+
content: [
|
|
276
|
+
{
|
|
277
|
+
type: 'text',
|
|
278
|
+
text: resultText,
|
|
279
|
+
},
|
|
280
|
+
],
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
catch (error) {
|
|
284
|
+
return {
|
|
285
|
+
content: [
|
|
286
|
+
{
|
|
287
|
+
type: 'text',
|
|
288
|
+
text: `Error batch assigning tags: ${error.message || 'Unknown error'}`,
|
|
289
|
+
},
|
|
290
|
+
],
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
/**
|
|
295
|
+
* Remove tag from WorkNode
|
|
296
|
+
*/
|
|
297
|
+
server.registerTool('brxce_remove_tag_from_worknode', {
|
|
298
|
+
description: `Remove a tag from a WorkNode.
|
|
299
|
+
|
|
300
|
+
**When to use:**
|
|
301
|
+
- When a tag is no longer relevant to the WorkNode
|
|
302
|
+
- To correct mis-tagging
|
|
303
|
+
- User explicitly requests tag removal
|
|
304
|
+
|
|
305
|
+
**Constraints:**
|
|
306
|
+
- Cannot remove if it's the last tag from a required category
|
|
307
|
+
|
|
308
|
+
**Example:**
|
|
309
|
+
User: "Remove the React tag from task #142"
|
|
310
|
+
Assistant: Get React tag ID, then call:
|
|
311
|
+
brxce_remove_tag_from_worknode(workspaceId: 4, worknodeId: 142, tagId: 25)`,
|
|
312
|
+
inputSchema: {
|
|
313
|
+
workspaceId: z.number().describe('The workspace ID'),
|
|
314
|
+
worknodeId: z.number().describe('WorkNode ID'),
|
|
315
|
+
tagId: z.number().describe('Tag ID to remove')
|
|
316
|
+
}
|
|
317
|
+
}, async (args) => {
|
|
318
|
+
try {
|
|
319
|
+
const { workspaceId, worknodeId, tagId } = args;
|
|
320
|
+
const url = `/mcp/workspaces/${workspaceId}/worknodes/${worknodeId}/tags/${tagId}`;
|
|
321
|
+
const response = await apiClient.delete(url);
|
|
322
|
+
if (!response.success) {
|
|
323
|
+
return {
|
|
324
|
+
content: [
|
|
325
|
+
{
|
|
326
|
+
type: 'text',
|
|
327
|
+
text: `Failed to remove tag: ${response.message || 'Unknown error'}`,
|
|
328
|
+
},
|
|
329
|
+
],
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
return {
|
|
333
|
+
content: [
|
|
334
|
+
{
|
|
335
|
+
type: 'text',
|
|
336
|
+
text: `Tag removed from WorkNode #${worknodeId} successfully.`,
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
catch (error) {
|
|
342
|
+
return {
|
|
343
|
+
content: [
|
|
344
|
+
{
|
|
345
|
+
type: 'text',
|
|
346
|
+
text: `Error removing tag: ${error.message || 'Unknown error'}`,
|
|
347
|
+
},
|
|
348
|
+
],
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
//# sourceMappingURL=worknode-tag-tool.js.map
|
|
@@ -0,0 +1 @@
|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AC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;YACpD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC;YAC9C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;SAC/C;KACF,EACD,KAAK,EAAE,IAAyB,EAAE,EAAE;QAClC,IAAI,CAAC;YACH,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAI1C,CAAC;YAEF,MAAM,GAAG,GAAG,mBAAmB,WAAW,cAAc,UAAU,SAAS,KAAK,EAAE,CAAC;YAEnF,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,MAAM,CAGpC,GAAG,CAAC,CAAC;YAER,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACtB,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAM;4BACZ,IAAI,EAAE,yBAAyB,QAAQ,CAAC,OAAO,IAAI,eAAe,EAAE;yBACrE;qBACF;iBACF,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,8BAA8B,UAAU,gBAAgB;qBAC/D;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,uBAAuB,KAAK,CAAC,OAAO,IAAI,eAAe,EAAE;qBAChE;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { ApiClient } from '../services/api-client.js';
|
|
3
|
+
export declare function registerWorknodeUpdateTool(server: McpServer, apiClient: ApiClient): void;
|
|
4
|
+
//# sourceMappingURL=worknode-update-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worknode-update-tool.d.ts","sourceRoot":"","sources":["../../src/tools/worknode-update-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AA+BtD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,QA0bjF"}
|