@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,419 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const WorkspaceTreeRequestSchema = z.object({
|
|
3
|
+
workspaceId: z.number().describe('The workspace ID to fetch tree for'),
|
|
4
|
+
status: z.string().optional().describe('Filter by status (comma-separated). Options: backlog, not_started, in_progress, in_review, completed, cancelled'),
|
|
5
|
+
priority: z.string().optional().describe('Filter by priority (comma-separated). Options: low, medium, high, urgent, critical'),
|
|
6
|
+
nodeType: z.string().optional().describe('Filter by node type (comma-separated). Options: goal, project, subproject, task, subtask'),
|
|
7
|
+
assignee: z.string().optional().describe('Filter by assignee user ID'),
|
|
8
|
+
createdBy: z.string().optional().describe('Filter by creator user ID'),
|
|
9
|
+
includeCompleted: z.boolean().optional().describe('Include completed items (default: false)'),
|
|
10
|
+
includeCancelled: z.boolean().optional().describe('Include cancelled items (default: false)'),
|
|
11
|
+
includeAll: z.boolean().optional().describe('Include all statuses including completed and cancelled (overrides other flags)'),
|
|
12
|
+
includeArchived: z.boolean().optional().describe('Include archived items (default: false)'),
|
|
13
|
+
includeDeleted: z.boolean().optional().describe('Include soft-deleted items (default: false)'),
|
|
14
|
+
maxDepth: z.number().optional().describe('Maximum depth to return (0 = roots only)'),
|
|
15
|
+
tagIds: z.string().optional().describe('Filter by tag IDs (comma-separated, e.g., "13,29")'),
|
|
16
|
+
tagSlugs: z.string().optional().describe('Filter by tag slugs (comma-separated, e.g., "mcp-server,backend")'),
|
|
17
|
+
matchAllTags: z.boolean().optional().describe('If true, WorkNode must have ALL specified tags. If false (default), ANY tag matches'),
|
|
18
|
+
compact: z.boolean().optional().describe('Return compact format (minimal fields for token efficiency, reduces response size by ~80%, default: false)'),
|
|
19
|
+
createdAfter: z.string().optional().describe('Filter nodes created after this date (ISO 8601, e.g., "2025-01-01T00:00:00Z")'),
|
|
20
|
+
createdBefore: z.string().optional().describe('Filter nodes created before this date (ISO 8601)'),
|
|
21
|
+
updatedAfter: z.string().optional().describe('Filter nodes updated after this date (ISO 8601)'),
|
|
22
|
+
updatedBefore: z.string().optional().describe('Filter nodes updated before this date (ISO 8601)'),
|
|
23
|
+
dueAfter: z.string().optional().describe('Filter nodes with due date after this date (ISO 8601)'),
|
|
24
|
+
dueBefore: z.string().optional().describe('Filter nodes with due date before this date (ISO 8601)'),
|
|
25
|
+
completedAfter: z.string().optional().describe('Filter nodes completed after this date (ISO 8601)'),
|
|
26
|
+
completedBefore: z.string().optional().describe('Filter nodes completed before this date (ISO 8601)'),
|
|
27
|
+
startAfter: z.string().optional().describe('Filter nodes with start date after this date (ISO 8601)'),
|
|
28
|
+
startBefore: z.string().optional().describe('Filter nodes with start date before this date (ISO 8601)'),
|
|
29
|
+
sortBy: z.enum(['title', 'priority', 'status', 'dueDate', 'createdAt', 'updatedAt', 'completedAt', 'nodeType', 'progress']).optional().describe('Sort field. Options: title, priority, status, dueDate, createdAt, updatedAt, completedAt, nodeType, progress'),
|
|
30
|
+
sortOrder: z.enum(['asc', 'desc']).optional().describe('Sort direction (default: asc)')
|
|
31
|
+
});
|
|
32
|
+
export function registerWorkspaceTreeTool(server, apiClient) {
|
|
33
|
+
server.registerTool('brxce_workspace_overview', {
|
|
34
|
+
description: `Get workspace WorkNodes in hierarchical tree structure optimized for LLM comprehension.
|
|
35
|
+
|
|
36
|
+
⚠️ **CRITICAL: Workspace Verification Required**
|
|
37
|
+
Before calling this tool, you MUST:
|
|
38
|
+
1. Read the \`user://me\` resource to get available workspaces
|
|
39
|
+
2. Identify the correct workspaceId from the resource data
|
|
40
|
+
3. If user mentions a workspace name, match it against available workspaces
|
|
41
|
+
4. If ambiguous, ask user to clarify which workspace to use
|
|
42
|
+
5. NEVER assume or guess workspaceId values
|
|
43
|
+
|
|
44
|
+
**Example Workflow:**
|
|
45
|
+
\`\`\`
|
|
46
|
+
User: "Show me the project structure"
|
|
47
|
+
LLM:
|
|
48
|
+
1. Reads user://me resource
|
|
49
|
+
2. Finds workspaces: [{id: 138, name: "BRXCE Development"}, {id: 42, name: "Personal"}]
|
|
50
|
+
3. If unclear, asks: "Which workspace? (138: BRXCE Development, 42: Personal)"
|
|
51
|
+
4. Uses confirmed workspaceId in tool call
|
|
52
|
+
\`\`\`
|
|
53
|
+
|
|
54
|
+
**When to use this tool:**
|
|
55
|
+
Use this when you need to understand the workspace hierarchy and parent-child relationships, not just filtered statistics.
|
|
56
|
+
|
|
57
|
+
**Tree Structure:**
|
|
58
|
+
Returns WorkNodes in depth-first order (parent before children) with:
|
|
59
|
+
- Explicit \`depth\` levels for each node (0 = root, 1 = child, etc.)
|
|
60
|
+
- \`nodePath\` showing the full hierarchy path
|
|
61
|
+
- \`hasChildren\` and \`childrenCount\` for immediate children
|
|
62
|
+
- \`descendantsCount\` for total descendants (children + grandchildren + ...)
|
|
63
|
+
- Parent-child relationships via \`parentNodeId\`
|
|
64
|
+
|
|
65
|
+
**Tree Format:**
|
|
66
|
+
The tree is returned as a flat array in depth-first traversal order:
|
|
67
|
+
\`\`\`
|
|
68
|
+
[
|
|
69
|
+
{ id: 100, title: "Goal A", depth: 0, childrenCount: 2, descendantsCount: 5, ... },
|
|
70
|
+
{ id: 101, title: "Project A1", depth: 1, parentNodeId: 100, childrenCount: 2, ... },
|
|
71
|
+
{ id: 102, title: "Task A1a", depth: 2, parentNodeId: 101, childrenCount: 0, ... },
|
|
72
|
+
{ id: 103, title: "Task A1b", depth: 2, parentNodeId: 101, childrenCount: 1, ... },
|
|
73
|
+
{ id: 104, title: "SubTask A1b1", depth: 3, parentNodeId: 103, childrenCount: 0, ... },
|
|
74
|
+
{ id: 105, title: "Project A2", depth: 1, parentNodeId: 100, childrenCount: 0, ... }
|
|
75
|
+
]
|
|
76
|
+
\`\`\`
|
|
77
|
+
|
|
78
|
+
This makes it easy for LLMs to:
|
|
79
|
+
1. **Understand hierarchy** at a glance from \`depth\` and \`parentNodeId\`
|
|
80
|
+
2. **Navigate** parent-before-children order
|
|
81
|
+
3. **Calculate scope** using \`descendantsCount\`
|
|
82
|
+
4. **Identify leaves** where \`hasChildren = false\`
|
|
83
|
+
|
|
84
|
+
**Same Structure as Electron App:**
|
|
85
|
+
This tree structure matches exactly what users see in the BRXCE Electron app UI, using the same ltree-based algorithm.
|
|
86
|
+
|
|
87
|
+
**Default Behavior:**
|
|
88
|
+
- Returns all non-completed, non-cancelled items by default
|
|
89
|
+
- Excludes archived and deleted items
|
|
90
|
+
- Use filters to customize what's included
|
|
91
|
+
|
|
92
|
+
**Compact Mode (Token Efficiency):**
|
|
93
|
+
- When \`compact=true\`, returns only essential fields: id, title, nodeType, status, priority, depth, nodePath, parentNodeId, hasChildren, childrenCount, descendantsCount, workspaceId
|
|
94
|
+
- When \`compact=false\` or omitted, returns all fields including: assignee, progress, dueDate, completedAt, tags (simplified: name, slug, color), etc.
|
|
95
|
+
- **Achieves ~80% size reduction** (e.g., 242KB → 42KB for 126 nodes)
|
|
96
|
+
- Use compact mode when you only need basic hierarchy and don't need detailed metadata
|
|
97
|
+
|
|
98
|
+
**Filters:**
|
|
99
|
+
All filters work the same as \`brxce_workspace_overview\`:
|
|
100
|
+
- \`status\`: Filter by status (comma-separated)
|
|
101
|
+
- \`priority\`: Filter by priority (comma-separated)
|
|
102
|
+
- \`nodeType\`: Filter by type (comma-separated)
|
|
103
|
+
- \`assignee\`: Filter by assignee user ID
|
|
104
|
+
- \`createdBy\`: Filter by creator user ID
|
|
105
|
+
- \`tagIds\`: Filter by tag IDs (comma-separated, e.g., "13,29")
|
|
106
|
+
- \`tagSlugs\`: Filter by tag slugs (comma-separated, e.g., "mcp-server,backend")
|
|
107
|
+
- \`matchAllTags\`: Require ALL tags (true) or ANY tag (false, default)
|
|
108
|
+
- \`includeCompleted\`: Include completed items
|
|
109
|
+
- \`includeCancelled\`: Include cancelled items
|
|
110
|
+
- \`includeAll\`: Include all statuses (overrides other flags)
|
|
111
|
+
- \`includeArchived\`: Include archived items
|
|
112
|
+
- \`includeDeleted\`: Include deleted items
|
|
113
|
+
- \`maxDepth\`: Limit tree depth (0 = roots only, 1 = roots + children, etc.)
|
|
114
|
+
- \`compact\`: Return compact format (minimal fields for token efficiency)
|
|
115
|
+
|
|
116
|
+
**Example - View Active Work Tree:**
|
|
117
|
+
\`\`\`json
|
|
118
|
+
{
|
|
119
|
+
"workspaceId": 4,
|
|
120
|
+
"status": "in_progress,not_started"
|
|
121
|
+
}
|
|
122
|
+
\`\`\`
|
|
123
|
+
|
|
124
|
+
**Example - View Complete Goal Hierarchy:**
|
|
125
|
+
\`\`\`json
|
|
126
|
+
{
|
|
127
|
+
"workspaceId": 4,
|
|
128
|
+
"nodeType": "goal,project",
|
|
129
|
+
"maxDepth": 2,
|
|
130
|
+
"includeAll": true
|
|
131
|
+
}
|
|
132
|
+
\`\`\`
|
|
133
|
+
|
|
134
|
+
**Example - View My Assigned Tasks Tree:**
|
|
135
|
+
\`\`\`json
|
|
136
|
+
{
|
|
137
|
+
"workspaceId": 4,
|
|
138
|
+
"assignee": "user-123",
|
|
139
|
+
"nodeType": "task,subtask"
|
|
140
|
+
}
|
|
141
|
+
\`\`\`
|
|
142
|
+
|
|
143
|
+
**Example - View WorkNodes with Specific Tags:**
|
|
144
|
+
\`\`\`json
|
|
145
|
+
{
|
|
146
|
+
"workspaceId": 138,
|
|
147
|
+
"tagIds": "13",
|
|
148
|
+
"status": "in_progress,not_started"
|
|
149
|
+
}
|
|
150
|
+
\`\`\`
|
|
151
|
+
|
|
152
|
+
**Example - View WorkNodes with Multiple Tags (ANY):**
|
|
153
|
+
\`\`\`json
|
|
154
|
+
{
|
|
155
|
+
"workspaceId": 138,
|
|
156
|
+
"tagSlugs": "mcp-server,backend",
|
|
157
|
+
"matchAllTags": false
|
|
158
|
+
}
|
|
159
|
+
\`\`\`
|
|
160
|
+
|
|
161
|
+
**Example - View WorkNodes with All Required Tags (AND):**
|
|
162
|
+
\`\`\`json
|
|
163
|
+
{
|
|
164
|
+
"workspaceId": 138,
|
|
165
|
+
"tagIds": "13,29",
|
|
166
|
+
"matchAllTags": true,
|
|
167
|
+
"priority": "critical,high"
|
|
168
|
+
}
|
|
169
|
+
\`\`\`
|
|
170
|
+
|
|
171
|
+
**Statistics Included:**
|
|
172
|
+
The response includes aggregated statistics:
|
|
173
|
+
- \`totalNodes\`: Total nodes in tree
|
|
174
|
+
- \`rootNodes\`: Number of root-level nodes
|
|
175
|
+
- \`maxDepth\`: Maximum depth in tree
|
|
176
|
+
- \`byStatus\`: Count by status
|
|
177
|
+
- \`byNodeType\`: Count by type
|
|
178
|
+
- \`byPriority\`: Count by priority
|
|
179
|
+
|
|
180
|
+
**Use Cases:**
|
|
181
|
+
- "Show me the project structure for workspace X"
|
|
182
|
+
- "What goals and their sub-projects are in progress?"
|
|
183
|
+
- "Display the hierarchy of tasks under project Y"
|
|
184
|
+
- "What's the breakdown of Goal Z?"
|
|
185
|
+
- "Show me the tree of all high-priority work"
|
|
186
|
+
|
|
187
|
+
⏰ **TIMEZONE HANDLING:**
|
|
188
|
+
ALL date/time fields in the response are in UTC (ISO 8601 format):
|
|
189
|
+
- completedAt, createdAt, updatedAt, dueDate, startDate
|
|
190
|
+
|
|
191
|
+
When presenting results to the user, you MUST convert UTC timestamps to the user's local timezone:
|
|
192
|
+
1. Check the current date/time from the <env> tag in the system prompt
|
|
193
|
+
2. Identify the user's timezone (e.g., Asia/Seoul = UTC+9)
|
|
194
|
+
3. Convert ALL displayed timestamps from UTC to local time
|
|
195
|
+
4. Format dates in a user-friendly way (e.g., "오후 5:16" not "08:16 UTC")
|
|
196
|
+
|
|
197
|
+
Example conversion (Korea Time, UTC+9):
|
|
198
|
+
- API returns: "completedAt": "2025-10-20T08:16:25.556Z" (UTC)
|
|
199
|
+
- Display to user: "완료: 2025-10-20 오후 5:16" (KST)
|
|
200
|
+
|
|
201
|
+
**Comparison with other tools:**
|
|
202
|
+
- Use \`brxce_worknode_subtree\` for subtree of a specific node
|
|
203
|
+
- Use **this tool** (workspace overview) for complete workspace hierarchy understanding`,
|
|
204
|
+
inputSchema: {
|
|
205
|
+
workspaceId: z.number().describe('Workspace ID from user://me resource. REQUIRED: Must verify against resource before using.'),
|
|
206
|
+
status: z.string().optional().describe('Filter by status (comma-separated)'),
|
|
207
|
+
priority: z.string().optional().describe('Filter by priority (comma-separated)'),
|
|
208
|
+
nodeType: z.string().optional().describe('Filter by node type (comma-separated)'),
|
|
209
|
+
assignee: z.string().optional().describe('Filter by assignee user ID'),
|
|
210
|
+
createdBy: z.string().optional().describe('Filter by creator user ID'),
|
|
211
|
+
includeCompleted: z.boolean().optional().describe('Include completed items (default: false)'),
|
|
212
|
+
includeCancelled: z.boolean().optional().describe('Include cancelled items (default: false)'),
|
|
213
|
+
includeAll: z.boolean().optional().describe('Include all statuses (default: false)'),
|
|
214
|
+
includeArchived: z.boolean().optional().describe('Include archived items (default: false)'),
|
|
215
|
+
includeDeleted: z.boolean().optional().describe('Include deleted items (default: false)'),
|
|
216
|
+
maxDepth: z.number().optional().describe('Maximum depth to return'),
|
|
217
|
+
tagIds: z.string().optional().describe('Filter by tag IDs (comma-separated, e.g., "13,29")'),
|
|
218
|
+
tagSlugs: z.string().optional().describe('Filter by tag slugs (comma-separated, e.g., "mcp-server,backend")'),
|
|
219
|
+
matchAllTags: z.boolean().optional().describe('If true, WorkNode must have ALL specified tags. If false (default), ANY tag matches'),
|
|
220
|
+
compact: z.boolean().optional().describe('Return compact format (minimal fields for token efficiency, ~80% size reduction, default: false)'),
|
|
221
|
+
createdAfter: z.string().optional().describe('Filter nodes created after this date (ISO 8601)'),
|
|
222
|
+
createdBefore: z.string().optional().describe('Filter nodes created before this date (ISO 8601)'),
|
|
223
|
+
updatedAfter: z.string().optional().describe('Filter nodes updated after this date (ISO 8601)'),
|
|
224
|
+
updatedBefore: z.string().optional().describe('Filter nodes updated before this date (ISO 8601)'),
|
|
225
|
+
dueAfter: z.string().optional().describe('Filter nodes with due date after this date (ISO 8601)'),
|
|
226
|
+
dueBefore: z.string().optional().describe('Filter nodes with due date before this date (ISO 8601)'),
|
|
227
|
+
completedAfter: z.string().optional().describe('Filter nodes completed after this date (ISO 8601)'),
|
|
228
|
+
completedBefore: z.string().optional().describe('Filter nodes completed before this date (ISO 8601)'),
|
|
229
|
+
startAfter: z.string().optional().describe('Filter nodes with start date after this date (ISO 8601)'),
|
|
230
|
+
startBefore: z.string().optional().describe('Filter nodes with start date before this date (ISO 8601)'),
|
|
231
|
+
sortBy: z.enum(['title', 'priority', 'status', 'dueDate', 'createdAt', 'updatedAt', 'completedAt', 'nodeType', 'progress']).optional().describe('Sort field'),
|
|
232
|
+
sortOrder: z.enum(['asc', 'desc']).optional().describe('Sort direction (default: asc)')
|
|
233
|
+
}
|
|
234
|
+
}, async (args) => {
|
|
235
|
+
const request = args;
|
|
236
|
+
try {
|
|
237
|
+
// Build query parameters
|
|
238
|
+
const queryParams = new URLSearchParams();
|
|
239
|
+
if (request.status)
|
|
240
|
+
queryParams.set('status', request.status);
|
|
241
|
+
if (request.priority)
|
|
242
|
+
queryParams.set('priority', request.priority);
|
|
243
|
+
if (request.nodeType)
|
|
244
|
+
queryParams.set('nodeType', request.nodeType);
|
|
245
|
+
if (request.assignee)
|
|
246
|
+
queryParams.set('assignee', request.assignee);
|
|
247
|
+
if (request.createdBy)
|
|
248
|
+
queryParams.set('createdBy', request.createdBy);
|
|
249
|
+
if (request.includeCompleted !== undefined)
|
|
250
|
+
queryParams.set('includeCompleted', String(request.includeCompleted));
|
|
251
|
+
if (request.includeCancelled !== undefined)
|
|
252
|
+
queryParams.set('includeCancelled', String(request.includeCancelled));
|
|
253
|
+
if (request.includeAll !== undefined)
|
|
254
|
+
queryParams.set('includeAll', String(request.includeAll));
|
|
255
|
+
if (request.includeArchived !== undefined)
|
|
256
|
+
queryParams.set('includeArchived', String(request.includeArchived));
|
|
257
|
+
if (request.includeDeleted !== undefined)
|
|
258
|
+
queryParams.set('includeDeleted', String(request.includeDeleted));
|
|
259
|
+
if (request.maxDepth !== undefined)
|
|
260
|
+
queryParams.set('maxDepth', String(request.maxDepth));
|
|
261
|
+
if (request.tagIds)
|
|
262
|
+
queryParams.set('tagIds', request.tagIds);
|
|
263
|
+
if (request.tagSlugs)
|
|
264
|
+
queryParams.set('tagSlugs', request.tagSlugs);
|
|
265
|
+
if (request.matchAllTags !== undefined)
|
|
266
|
+
queryParams.set('matchAllTags', String(request.matchAllTags));
|
|
267
|
+
if (request.compact !== undefined)
|
|
268
|
+
queryParams.set('compact', String(request.compact));
|
|
269
|
+
if (request.createdAfter)
|
|
270
|
+
queryParams.set('createdAfter', request.createdAfter);
|
|
271
|
+
if (request.createdBefore)
|
|
272
|
+
queryParams.set('createdBefore', request.createdBefore);
|
|
273
|
+
if (request.updatedAfter)
|
|
274
|
+
queryParams.set('updatedAfter', request.updatedAfter);
|
|
275
|
+
if (request.updatedBefore)
|
|
276
|
+
queryParams.set('updatedBefore', request.updatedBefore);
|
|
277
|
+
if (request.dueAfter)
|
|
278
|
+
queryParams.set('dueAfter', request.dueAfter);
|
|
279
|
+
if (request.dueBefore)
|
|
280
|
+
queryParams.set('dueBefore', request.dueBefore);
|
|
281
|
+
if (request.completedAfter)
|
|
282
|
+
queryParams.set('completedAfter', request.completedAfter);
|
|
283
|
+
if (request.completedBefore)
|
|
284
|
+
queryParams.set('completedBefore', request.completedBefore);
|
|
285
|
+
if (request.startAfter)
|
|
286
|
+
queryParams.set('startAfter', request.startAfter);
|
|
287
|
+
if (request.startBefore)
|
|
288
|
+
queryParams.set('startBefore', request.startBefore);
|
|
289
|
+
if (request.sortBy)
|
|
290
|
+
queryParams.set('sortBy', request.sortBy);
|
|
291
|
+
if (request.sortOrder)
|
|
292
|
+
queryParams.set('sortOrder', request.sortOrder);
|
|
293
|
+
const queryString = queryParams.toString();
|
|
294
|
+
const url = `/mcp/workspaces/${request.workspaceId}/overview${queryString ? `?${queryString}` : ''}`;
|
|
295
|
+
const response = await apiClient.get(url);
|
|
296
|
+
if (!response.success) {
|
|
297
|
+
return {
|
|
298
|
+
content: [
|
|
299
|
+
{
|
|
300
|
+
type: 'text',
|
|
301
|
+
text: `Failed to retrieve workspace tree: ${response.message || 'Unknown error'}`,
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
const { tree, stats } = response.data;
|
|
307
|
+
// Format output for LLM
|
|
308
|
+
let resultText = `## Workspace Tree (ID: ${request.workspaceId})\\n\\n`;
|
|
309
|
+
// Statistics summary
|
|
310
|
+
resultText += `**Statistics:**\\n`;
|
|
311
|
+
resultText += `- Total nodes: ${stats.totalNodes}\\n`;
|
|
312
|
+
resultText += `- Root nodes: ${stats.rootNodes}\\n`;
|
|
313
|
+
resultText += `- Max depth: ${stats.maxDepth}\\n`;
|
|
314
|
+
resultText += `\\n`;
|
|
315
|
+
if (Object.keys(stats.byStatus).length > 0) {
|
|
316
|
+
resultText += `**By Status:**\\n`;
|
|
317
|
+
Object.entries(stats.byStatus).forEach(([status, count]) => {
|
|
318
|
+
resultText += `- ${status}: ${count}\\n`;
|
|
319
|
+
});
|
|
320
|
+
resultText += `\\n`;
|
|
321
|
+
}
|
|
322
|
+
if (Object.keys(stats.byNodeType).length > 0) {
|
|
323
|
+
resultText += `**By Type:**\\n`;
|
|
324
|
+
Object.entries(stats.byNodeType).forEach(([type, count]) => {
|
|
325
|
+
resultText += `- ${type}: ${count}\\n`;
|
|
326
|
+
});
|
|
327
|
+
resultText += `\\n`;
|
|
328
|
+
}
|
|
329
|
+
if (Object.keys(stats.byPriority).length > 0) {
|
|
330
|
+
resultText += `**By Priority:**\\n`;
|
|
331
|
+
Object.entries(stats.byPriority).forEach(([priority, count]) => {
|
|
332
|
+
resultText += `- ${priority}: ${count}\\n`;
|
|
333
|
+
});
|
|
334
|
+
resultText += `\\n`;
|
|
335
|
+
}
|
|
336
|
+
// Tree structure
|
|
337
|
+
resultText += `**Tree Structure (Depth-First Order):**\\n\\n`;
|
|
338
|
+
if (tree.length === 0) {
|
|
339
|
+
resultText += `No nodes found matching the filters.\\n`;
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
tree.forEach((node) => {
|
|
343
|
+
// Indentation based on depth
|
|
344
|
+
const indent = ' '.repeat(node.depth);
|
|
345
|
+
// Node type emoji
|
|
346
|
+
const typeEmoji = {
|
|
347
|
+
goal: '🎯',
|
|
348
|
+
project: '📁',
|
|
349
|
+
subproject: '📂',
|
|
350
|
+
task: '✅',
|
|
351
|
+
subtask: '☑️'
|
|
352
|
+
}[node.nodeType] || '📄';
|
|
353
|
+
// Status indicator
|
|
354
|
+
const statusEmoji = {
|
|
355
|
+
backlog: '📥',
|
|
356
|
+
not_started: '⭕',
|
|
357
|
+
in_progress: '🔄',
|
|
358
|
+
in_review: '👀',
|
|
359
|
+
completed: '✅',
|
|
360
|
+
cancelled: '❌'
|
|
361
|
+
}[node.status] || '❓';
|
|
362
|
+
// Priority indicator
|
|
363
|
+
const priorityEmoji = {
|
|
364
|
+
critical: '🔥',
|
|
365
|
+
urgent: '⚡',
|
|
366
|
+
high: '🔴',
|
|
367
|
+
medium: '🟡',
|
|
368
|
+
low: '🟢'
|
|
369
|
+
}[node.priority] || '';
|
|
370
|
+
// Build node line
|
|
371
|
+
let nodeLine = `${indent}${typeEmoji} **${node.title}** (ID: ${node.id})`;
|
|
372
|
+
nodeLine += ` ${statusEmoji}`;
|
|
373
|
+
if (priorityEmoji)
|
|
374
|
+
nodeLine += ` ${priorityEmoji}`;
|
|
375
|
+
// Add metadata
|
|
376
|
+
const metadata = [];
|
|
377
|
+
if (node.progress > 0)
|
|
378
|
+
metadata.push(`${node.progress}%`);
|
|
379
|
+
if (node.assignee && node.assignee.length > 0) {
|
|
380
|
+
metadata.push(`→ ${node.assignee.join(', ')}`);
|
|
381
|
+
}
|
|
382
|
+
if (node.childrenCount > 0) {
|
|
383
|
+
metadata.push(`${node.childrenCount} children, ${node.descendantsCount} total`);
|
|
384
|
+
}
|
|
385
|
+
if (node.dueDate) {
|
|
386
|
+
const dueDate = new Date(node.dueDate);
|
|
387
|
+
metadata.push(`due: ${dueDate.toISOString().split('T')[0]}`);
|
|
388
|
+
}
|
|
389
|
+
if (metadata.length > 0) {
|
|
390
|
+
nodeLine += ` (${metadata.join(', ')})`;
|
|
391
|
+
}
|
|
392
|
+
resultText += `${nodeLine}\\n`;
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
resultText += `\\n---\\n`;
|
|
396
|
+
resultText += `**Note:** This tree uses depth-first traversal matching the Electron app UI.\\n`;
|
|
397
|
+
resultText += `Each node shows: type, title, ID, status, priority, progress, assignees, children count, and due date.\\n`;
|
|
398
|
+
return {
|
|
399
|
+
content: [
|
|
400
|
+
{
|
|
401
|
+
type: 'text',
|
|
402
|
+
text: resultText,
|
|
403
|
+
},
|
|
404
|
+
],
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
catch (error) {
|
|
408
|
+
return {
|
|
409
|
+
content: [
|
|
410
|
+
{
|
|
411
|
+
type: 'text',
|
|
412
|
+
text: `Error retrieving workspace tree: ${error.message || 'Unknown error'}`,
|
|
413
|
+
},
|
|
414
|
+
],
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
//# sourceMappingURL=workspace-tree-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-tree-tool.js","sourceRoot":"","sources":["../../src/tools/workspace-tree-tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;IACtE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iHAAiH,CAAC;IACzJ,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oFAAoF,CAAC;IAC9H,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0FAA0F,CAAC;IACpI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;IACtE,SAAS,EAAE,CAAC,CAAC,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|
1
|
+
{
|
|
2
|
+
"name": "@brxce/mcp-server",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Model Context Protocol (MCP) server for BRXCE workspace management",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"brxce-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"README.md",
|
|
13
|
+
"package.json"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"dev": "tsx watch src/index.ts",
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"start": "node dist/index.js",
|
|
19
|
+
"lint": "eslint src/**/*.ts --fix",
|
|
20
|
+
"check-types": "tsc --noEmit",
|
|
21
|
+
"prepublishOnly": "pnpm build"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"mcp",
|
|
25
|
+
"model-context-protocol",
|
|
26
|
+
"brxce",
|
|
27
|
+
"workspace",
|
|
28
|
+
"productivity",
|
|
29
|
+
"task-management"
|
|
30
|
+
],
|
|
31
|
+
"author": "BRXCE Team",
|
|
32
|
+
"license": "MIT",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/intellieffect/brxce.git",
|
|
36
|
+
"directory": "apps/mcp-server"
|
|
37
|
+
},
|
|
38
|
+
"homepage": "https://github.com/intellieffect/brxce/tree/main/apps/mcp-server#readme",
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/intellieffect/brxce/issues"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18.0.0"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@modelcontextprotocol/sdk": "^1.17.1",
|
|
47
|
+
"jsonwebtoken": "^9.0.2",
|
|
48
|
+
"zod": "^3.23.8"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@types/jsonwebtoken": "^9.0.10",
|
|
52
|
+
"@types/node": "^22.17.0",
|
|
53
|
+
"tsx": "^4.0.0",
|
|
54
|
+
"typescript": "^5.8.3"
|
|
55
|
+
},
|
|
56
|
+
"eslintConfig": {
|
|
57
|
+
"extends": [
|
|
58
|
+
"@repo/eslint-config/node"
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
}
|