@claudetools/tools 0.1.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 +86 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +61 -0
- package/dist/handlers/tool-handlers.d.ts +2 -0
- package/dist/handlers/tool-handlers.js +1108 -0
- package/dist/helpers/api-client.d.ts +50 -0
- package/dist/helpers/api-client.js +60 -0
- package/dist/helpers/config-manager.d.ts +68 -0
- package/dist/helpers/config-manager.js +306 -0
- package/dist/helpers/config.d.ts +55 -0
- package/dist/helpers/config.js +174 -0
- package/dist/helpers/dependencies.d.ts +30 -0
- package/dist/helpers/dependencies.js +87 -0
- package/dist/helpers/formatter.d.ts +2 -0
- package/dist/helpers/formatter.js +24 -0
- package/dist/helpers/patterns.d.ts +15 -0
- package/dist/helpers/patterns.js +118 -0
- package/dist/helpers/project-registration.d.ts +27 -0
- package/dist/helpers/project-registration.js +338 -0
- package/dist/helpers/tasks.d.ts +152 -0
- package/dist/helpers/tasks.js +274 -0
- package/dist/helpers/workers.d.ts +18 -0
- package/dist/helpers/workers.js +146 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +75 -0
- package/dist/logger.d.ts +32 -0
- package/dist/logger.js +401 -0
- package/dist/prompts.d.ts +2 -0
- package/dist/prompts.js +64 -0
- package/dist/resources.d.ts +2 -0
- package/dist/resources.js +79 -0
- package/dist/setup.d.ts +1 -0
- package/dist/setup.js +206 -0
- package/dist/tools.d.ts +2 -0
- package/dist/tools.js +748 -0
- package/package.json +58 -0
package/dist/tools.js
ADDED
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// MCP Tool Definitions
|
|
3
|
+
// =============================================================================
|
|
4
|
+
import { ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
5
|
+
export function registerToolDefinitions(server) {
|
|
6
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
7
|
+
tools: [
|
|
8
|
+
{
|
|
9
|
+
name: 'memory_search',
|
|
10
|
+
description: 'Search the memory system for relevant facts and entities based on a query. Use this to recall past conversations, facts, and relationships. NOTE: Context is now automatically injected - use this only for explicit searches.',
|
|
11
|
+
inputSchema: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
query: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The search query to find relevant memories',
|
|
17
|
+
},
|
|
18
|
+
project_id: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
21
|
+
},
|
|
22
|
+
limit: {
|
|
23
|
+
type: 'number',
|
|
24
|
+
description: 'Maximum number of results (default: 10)',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ['query'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'memory_explain',
|
|
32
|
+
description: 'Explain what memory context was automatically injected in the last response. Use this when you want to understand what memories are being used.',
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
properties: {},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'memory_inject',
|
|
40
|
+
description: 'Manually trigger context injection for a specific query. Normally context is injected automatically, but use this for explicit control.',
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
properties: {
|
|
44
|
+
query: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'The query to inject context for',
|
|
47
|
+
},
|
|
48
|
+
project_id: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
required: ['query'],
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'memory_add',
|
|
58
|
+
description: 'Add new memories from conversation messages. The system will automatically extract entities and relationships.',
|
|
59
|
+
inputSchema: {
|
|
60
|
+
type: 'object',
|
|
61
|
+
properties: {
|
|
62
|
+
session_id: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'Session identifier for grouping related messages',
|
|
65
|
+
},
|
|
66
|
+
messages: {
|
|
67
|
+
type: 'array',
|
|
68
|
+
items: {
|
|
69
|
+
type: 'object',
|
|
70
|
+
properties: {
|
|
71
|
+
role: { type: 'string', enum: ['user', 'assistant', 'system'] },
|
|
72
|
+
content: { type: 'string' },
|
|
73
|
+
},
|
|
74
|
+
required: ['role', 'content'],
|
|
75
|
+
},
|
|
76
|
+
description: 'Array of messages to store',
|
|
77
|
+
},
|
|
78
|
+
project_id: {
|
|
79
|
+
type: 'string',
|
|
80
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
81
|
+
},
|
|
82
|
+
extract_facts: {
|
|
83
|
+
type: 'boolean',
|
|
84
|
+
description: 'Whether to extract facts and entities (default: true)',
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
required: ['session_id', 'messages'],
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'memory_store_fact',
|
|
92
|
+
description: 'Store a specific fact as a relationship between two entities. Use this when you learn something concrete about entities.',
|
|
93
|
+
inputSchema: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
properties: {
|
|
96
|
+
entity1: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'The first entity (subject)',
|
|
99
|
+
},
|
|
100
|
+
relationship: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
description: 'The relationship type (e.g., WORKS_FOR, USES, LIKES)',
|
|
103
|
+
},
|
|
104
|
+
entity2: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
description: 'The second entity (object)',
|
|
107
|
+
},
|
|
108
|
+
context: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
description: 'Description or context of the fact',
|
|
111
|
+
},
|
|
112
|
+
project_id: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
required: ['entity1', 'relationship', 'entity2', 'context'],
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'memory_get_context',
|
|
122
|
+
description: 'Get the current memory context, optionally filtered by a query. Returns recent facts and entities.',
|
|
123
|
+
inputSchema: {
|
|
124
|
+
type: 'object',
|
|
125
|
+
properties: {
|
|
126
|
+
query: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
description: 'Optional query to filter context',
|
|
129
|
+
},
|
|
130
|
+
project_id: {
|
|
131
|
+
type: 'string',
|
|
132
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'memory_summary',
|
|
139
|
+
description: 'Get a summary of the memory system state including counts of entities, facts, and episodes.',
|
|
140
|
+
inputSchema: {
|
|
141
|
+
type: 'object',
|
|
142
|
+
properties: {
|
|
143
|
+
project_id: {
|
|
144
|
+
type: 'string',
|
|
145
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: 'memory_list_entities',
|
|
152
|
+
description: 'List all known entities in the memory system.',
|
|
153
|
+
inputSchema: {
|
|
154
|
+
type: 'object',
|
|
155
|
+
properties: {
|
|
156
|
+
project_id: {
|
|
157
|
+
type: 'string',
|
|
158
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: 'query_dependencies',
|
|
165
|
+
description: 'Query function call dependencies from the code graph. Find what functions a given function calls (forward) or what functions call it (reverse). Week 4: Dependency Query Tool.',
|
|
166
|
+
inputSchema: {
|
|
167
|
+
type: 'object',
|
|
168
|
+
properties: {
|
|
169
|
+
function_name: {
|
|
170
|
+
type: 'string',
|
|
171
|
+
description: 'The function name to query dependencies for',
|
|
172
|
+
},
|
|
173
|
+
direction: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
enum: ['forward', 'reverse', 'both'],
|
|
176
|
+
description: 'Query direction: "forward" = what does X call, "reverse" = what calls X, "both" = both directions',
|
|
177
|
+
},
|
|
178
|
+
project_id: {
|
|
179
|
+
type: 'string',
|
|
180
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
181
|
+
},
|
|
182
|
+
depth: {
|
|
183
|
+
type: 'number',
|
|
184
|
+
description: 'Maximum depth to traverse (default: 1, max: 5)',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
required: ['function_name', 'direction'],
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: 'analyze_impact',
|
|
192
|
+
description: 'Analyze the impact of changing a function by traversing its call graph. Shows which functions would be affected by changes. Week 5: Impact Analysis Tool.',
|
|
193
|
+
inputSchema: {
|
|
194
|
+
type: 'object',
|
|
195
|
+
properties: {
|
|
196
|
+
function_name: {
|
|
197
|
+
type: 'string',
|
|
198
|
+
description: 'The function name to analyze impact for',
|
|
199
|
+
},
|
|
200
|
+
analysis_type: {
|
|
201
|
+
type: 'string',
|
|
202
|
+
enum: ['change', 'delete', 'signature'],
|
|
203
|
+
description: 'Type of change: "change" = modification, "delete" = removal, "signature" = API change',
|
|
204
|
+
},
|
|
205
|
+
max_depth: {
|
|
206
|
+
type: 'number',
|
|
207
|
+
description: 'Maximum depth to traverse call graph (default: 3, max: 5)',
|
|
208
|
+
},
|
|
209
|
+
project_id: {
|
|
210
|
+
type: 'string',
|
|
211
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
required: ['function_name'],
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: 'check_patterns',
|
|
219
|
+
description: 'Check code for security and performance anti-patterns. Returns warnings and recommendations. Week 6: Pattern Detection Tool.',
|
|
220
|
+
inputSchema: {
|
|
221
|
+
type: 'object',
|
|
222
|
+
properties: {
|
|
223
|
+
code: {
|
|
224
|
+
type: 'string',
|
|
225
|
+
description: 'The code snippet to analyze for patterns',
|
|
226
|
+
},
|
|
227
|
+
file_path: {
|
|
228
|
+
type: 'string',
|
|
229
|
+
description: 'Optional file path for context (helps with language detection)',
|
|
230
|
+
},
|
|
231
|
+
check_types: {
|
|
232
|
+
type: 'array',
|
|
233
|
+
items: { type: 'string', enum: ['security', 'performance', 'all'] },
|
|
234
|
+
description: 'Types of patterns to check for (default: all)',
|
|
235
|
+
},
|
|
236
|
+
project_id: {
|
|
237
|
+
type: 'string',
|
|
238
|
+
description: 'Project ID (optional, uses default if not provided)',
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
required: ['code'],
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
// =========================================================================
|
|
245
|
+
// TASK MANAGEMENT TOOLS
|
|
246
|
+
// =========================================================================
|
|
247
|
+
{
|
|
248
|
+
name: 'task_plan',
|
|
249
|
+
description: 'PROACTIVE: When user describes work to be done, automatically create an epic with tasks. Use this whenever the user asks for a feature, fix, or any multi-step work. Creates the full task hierarchy and returns a plan.',
|
|
250
|
+
inputSchema: {
|
|
251
|
+
type: 'object',
|
|
252
|
+
properties: {
|
|
253
|
+
goal: {
|
|
254
|
+
type: 'string',
|
|
255
|
+
description: 'What the user wants to accomplish (their request in natural language)',
|
|
256
|
+
},
|
|
257
|
+
epic_title: {
|
|
258
|
+
type: 'string',
|
|
259
|
+
description: 'Title for the epic (short, descriptive)',
|
|
260
|
+
},
|
|
261
|
+
tasks: {
|
|
262
|
+
type: 'array',
|
|
263
|
+
items: {
|
|
264
|
+
type: 'object',
|
|
265
|
+
properties: {
|
|
266
|
+
title: { type: 'string' },
|
|
267
|
+
description: { type: 'string' },
|
|
268
|
+
effort: { type: 'string', enum: ['xs', 's', 'm', 'l', 'xl'] },
|
|
269
|
+
},
|
|
270
|
+
required: ['title'],
|
|
271
|
+
},
|
|
272
|
+
description: 'List of tasks to create under the epic',
|
|
273
|
+
},
|
|
274
|
+
priority: {
|
|
275
|
+
type: 'string',
|
|
276
|
+
enum: ['critical', 'high', 'medium', 'low'],
|
|
277
|
+
description: 'Priority level (default: medium)',
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
required: ['goal', 'epic_title', 'tasks'],
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: 'task_plan_draft',
|
|
285
|
+
description: 'INTERNAL: Returns a structured plan draft WITHOUT committing to database. Use this to present plans for user approval. Only call task_plan after user explicitly approves.',
|
|
286
|
+
inputSchema: {
|
|
287
|
+
type: 'object',
|
|
288
|
+
properties: {
|
|
289
|
+
goal: {
|
|
290
|
+
type: 'string',
|
|
291
|
+
description: 'What the user wants to accomplish',
|
|
292
|
+
},
|
|
293
|
+
epic_title: {
|
|
294
|
+
type: 'string',
|
|
295
|
+
description: 'Title for the epic',
|
|
296
|
+
},
|
|
297
|
+
approach: {
|
|
298
|
+
type: 'string',
|
|
299
|
+
description: 'High-level strategy and rationale',
|
|
300
|
+
},
|
|
301
|
+
context: {
|
|
302
|
+
type: 'string',
|
|
303
|
+
description: 'Relevant codebase context discovered during research',
|
|
304
|
+
},
|
|
305
|
+
tasks: {
|
|
306
|
+
type: 'array',
|
|
307
|
+
items: {
|
|
308
|
+
type: 'object',
|
|
309
|
+
properties: {
|
|
310
|
+
title: { type: 'string' },
|
|
311
|
+
description: { type: 'string' },
|
|
312
|
+
effort: { type: 'string', enum: ['xs', 's', 'm', 'l', 'xl'] },
|
|
313
|
+
acceptance_criteria: { type: 'array', items: { type: 'string' } },
|
|
314
|
+
},
|
|
315
|
+
required: ['title'],
|
|
316
|
+
},
|
|
317
|
+
description: 'List of tasks with details',
|
|
318
|
+
},
|
|
319
|
+
risks: {
|
|
320
|
+
type: 'array',
|
|
321
|
+
items: { type: 'string' },
|
|
322
|
+
description: 'Potential risks or considerations',
|
|
323
|
+
},
|
|
324
|
+
questions: {
|
|
325
|
+
type: 'array',
|
|
326
|
+
items: { type: 'string' },
|
|
327
|
+
description: 'Questions needing clarification before starting',
|
|
328
|
+
},
|
|
329
|
+
priority: {
|
|
330
|
+
type: 'string',
|
|
331
|
+
enum: ['critical', 'high', 'medium', 'low'],
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
required: ['goal', 'epic_title', 'tasks'],
|
|
335
|
+
},
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
name: 'task_start',
|
|
339
|
+
description: 'PROACTIVE: When starting work on a task, claim it and get all context. Use this before beginning any task work.',
|
|
340
|
+
inputSchema: {
|
|
341
|
+
type: 'object',
|
|
342
|
+
properties: {
|
|
343
|
+
task_id: {
|
|
344
|
+
type: 'string',
|
|
345
|
+
description: 'The task ID to start working on',
|
|
346
|
+
},
|
|
347
|
+
agent_id: {
|
|
348
|
+
type: 'string',
|
|
349
|
+
description: 'Your agent identifier (default: claude-code)',
|
|
350
|
+
},
|
|
351
|
+
},
|
|
352
|
+
required: ['task_id'],
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: 'task_complete',
|
|
357
|
+
description: 'PROACTIVE: When finished with a task, mark it complete with a summary of work done. Use this after completing any task.',
|
|
358
|
+
inputSchema: {
|
|
359
|
+
type: 'object',
|
|
360
|
+
properties: {
|
|
361
|
+
task_id: {
|
|
362
|
+
type: 'string',
|
|
363
|
+
description: 'The task ID that was completed',
|
|
364
|
+
},
|
|
365
|
+
summary: {
|
|
366
|
+
type: 'string',
|
|
367
|
+
description: 'Summary of what was accomplished',
|
|
368
|
+
},
|
|
369
|
+
agent_id: {
|
|
370
|
+
type: 'string',
|
|
371
|
+
description: 'Your agent identifier (default: claude-code)',
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
required: ['task_id', 'summary'],
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: 'task_create',
|
|
379
|
+
description: 'Create a new epic, task, or subtask. Use task_plan instead for creating full work plans.',
|
|
380
|
+
inputSchema: {
|
|
381
|
+
type: 'object',
|
|
382
|
+
properties: {
|
|
383
|
+
type: {
|
|
384
|
+
type: 'string',
|
|
385
|
+
enum: ['epic', 'task', 'subtask'],
|
|
386
|
+
description: 'Type of task: epic (large feature), task (work item), subtask (sub-item)',
|
|
387
|
+
},
|
|
388
|
+
title: {
|
|
389
|
+
type: 'string',
|
|
390
|
+
description: 'Title of the task',
|
|
391
|
+
},
|
|
392
|
+
description: {
|
|
393
|
+
type: 'string',
|
|
394
|
+
description: 'Detailed description of the task',
|
|
395
|
+
},
|
|
396
|
+
parent_id: {
|
|
397
|
+
type: 'string',
|
|
398
|
+
description: 'Parent task ID (required for tasks under epics, or subtasks under tasks)',
|
|
399
|
+
},
|
|
400
|
+
priority: {
|
|
401
|
+
type: 'string',
|
|
402
|
+
enum: ['critical', 'high', 'medium', 'low'],
|
|
403
|
+
description: 'Priority level (default: medium)',
|
|
404
|
+
},
|
|
405
|
+
acceptance_criteria: {
|
|
406
|
+
type: 'array',
|
|
407
|
+
items: { type: 'string' },
|
|
408
|
+
description: 'List of acceptance criteria for the task',
|
|
409
|
+
},
|
|
410
|
+
estimated_effort: {
|
|
411
|
+
type: 'string',
|
|
412
|
+
enum: ['xs', 's', 'm', 'l', 'xl'],
|
|
413
|
+
description: 'Estimated effort: xs (< 1hr), s (1-4hr), m (half day), l (full day), xl (multi-day)',
|
|
414
|
+
},
|
|
415
|
+
tags: {
|
|
416
|
+
type: 'array',
|
|
417
|
+
items: { type: 'string' },
|
|
418
|
+
description: 'Tags for categorization',
|
|
419
|
+
},
|
|
420
|
+
blocked_by: {
|
|
421
|
+
type: 'array',
|
|
422
|
+
items: { type: 'string' },
|
|
423
|
+
description: 'Task IDs that block this task',
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
required: ['type', 'title'],
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
name: 'task_list',
|
|
431
|
+
description: 'List tasks with optional filters. Use to see what work is planned, in progress, or completed.',
|
|
432
|
+
inputSchema: {
|
|
433
|
+
type: 'object',
|
|
434
|
+
properties: {
|
|
435
|
+
type: {
|
|
436
|
+
type: 'string',
|
|
437
|
+
enum: ['epic', 'task', 'subtask'],
|
|
438
|
+
description: 'Filter by task type',
|
|
439
|
+
},
|
|
440
|
+
status: {
|
|
441
|
+
type: 'string',
|
|
442
|
+
enum: ['backlog', 'ready', 'in_progress', 'blocked', 'review', 'done', 'cancelled'],
|
|
443
|
+
description: 'Filter by status',
|
|
444
|
+
},
|
|
445
|
+
parent_id: {
|
|
446
|
+
type: 'string',
|
|
447
|
+
description: 'Filter by parent task ID',
|
|
448
|
+
},
|
|
449
|
+
assigned_to: {
|
|
450
|
+
type: 'string',
|
|
451
|
+
description: 'Filter by assigned agent ID',
|
|
452
|
+
},
|
|
453
|
+
limit: {
|
|
454
|
+
type: 'number',
|
|
455
|
+
description: 'Maximum number of results (default: 50)',
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
name: 'task_get',
|
|
462
|
+
description: 'Get details of a specific task, optionally with full context (subtasks, parent, attached context).',
|
|
463
|
+
inputSchema: {
|
|
464
|
+
type: 'object',
|
|
465
|
+
properties: {
|
|
466
|
+
task_id: {
|
|
467
|
+
type: 'string',
|
|
468
|
+
description: 'The task ID to retrieve',
|
|
469
|
+
},
|
|
470
|
+
full: {
|
|
471
|
+
type: 'boolean',
|
|
472
|
+
description: 'Include full context (subtasks, parent, attached context)',
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
required: ['task_id'],
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
name: 'task_claim',
|
|
480
|
+
description: 'Claim a task for working on it. Creates a lock preventing other agents from working on it.',
|
|
481
|
+
inputSchema: {
|
|
482
|
+
type: 'object',
|
|
483
|
+
properties: {
|
|
484
|
+
task_id: {
|
|
485
|
+
type: 'string',
|
|
486
|
+
description: 'The task ID to claim',
|
|
487
|
+
},
|
|
488
|
+
agent_id: {
|
|
489
|
+
type: 'string',
|
|
490
|
+
description: 'Your agent identifier',
|
|
491
|
+
},
|
|
492
|
+
lock_duration_minutes: {
|
|
493
|
+
type: 'number',
|
|
494
|
+
description: 'Lock duration in minutes (default: 30)',
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
required: ['task_id', 'agent_id'],
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
name: 'task_release',
|
|
502
|
+
description: 'Release a claimed task. Use when done working or need to step away.',
|
|
503
|
+
inputSchema: {
|
|
504
|
+
type: 'object',
|
|
505
|
+
properties: {
|
|
506
|
+
task_id: {
|
|
507
|
+
type: 'string',
|
|
508
|
+
description: 'The task ID to release',
|
|
509
|
+
},
|
|
510
|
+
agent_id: {
|
|
511
|
+
type: 'string',
|
|
512
|
+
description: 'Your agent identifier',
|
|
513
|
+
},
|
|
514
|
+
new_status: {
|
|
515
|
+
type: 'string',
|
|
516
|
+
enum: ['backlog', 'ready', 'in_progress', 'blocked', 'review', 'done'],
|
|
517
|
+
description: 'New status for the task',
|
|
518
|
+
},
|
|
519
|
+
work_log: {
|
|
520
|
+
type: 'string',
|
|
521
|
+
description: 'Summary of work done during this claim',
|
|
522
|
+
},
|
|
523
|
+
},
|
|
524
|
+
required: ['task_id', 'agent_id'],
|
|
525
|
+
},
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
name: 'task_update_status',
|
|
529
|
+
description: 'Update the status of a task without claiming it.',
|
|
530
|
+
inputSchema: {
|
|
531
|
+
type: 'object',
|
|
532
|
+
properties: {
|
|
533
|
+
task_id: {
|
|
534
|
+
type: 'string',
|
|
535
|
+
description: 'The task ID to update',
|
|
536
|
+
},
|
|
537
|
+
status: {
|
|
538
|
+
type: 'string',
|
|
539
|
+
enum: ['backlog', 'ready', 'in_progress', 'blocked', 'review', 'done', 'cancelled'],
|
|
540
|
+
description: 'New status',
|
|
541
|
+
},
|
|
542
|
+
agent_id: {
|
|
543
|
+
type: 'string',
|
|
544
|
+
description: 'Your agent identifier (optional)',
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
required: ['task_id', 'status'],
|
|
548
|
+
},
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
name: 'task_add_context',
|
|
552
|
+
description: 'Add context to a task (code snippets, decisions, patterns, work logs, references).',
|
|
553
|
+
inputSchema: {
|
|
554
|
+
type: 'object',
|
|
555
|
+
properties: {
|
|
556
|
+
task_id: {
|
|
557
|
+
type: 'string',
|
|
558
|
+
description: 'The task ID to add context to',
|
|
559
|
+
},
|
|
560
|
+
context_type: {
|
|
561
|
+
type: 'string',
|
|
562
|
+
enum: ['code', 'memory', 'pattern', 'decision', 'reference', 'work_log'],
|
|
563
|
+
description: 'Type of context being added',
|
|
564
|
+
},
|
|
565
|
+
content: {
|
|
566
|
+
type: 'string',
|
|
567
|
+
description: 'The context content',
|
|
568
|
+
},
|
|
569
|
+
added_by: {
|
|
570
|
+
type: 'string',
|
|
571
|
+
description: 'Your agent identifier',
|
|
572
|
+
},
|
|
573
|
+
source: {
|
|
574
|
+
type: 'string',
|
|
575
|
+
description: 'Source reference (e.g., file path, URL)',
|
|
576
|
+
},
|
|
577
|
+
},
|
|
578
|
+
required: ['task_id', 'context_type', 'content', 'added_by'],
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
name: 'task_summary',
|
|
583
|
+
description: 'Get a summary of tasks for the current project (counts by status, by type, active agents).',
|
|
584
|
+
inputSchema: {
|
|
585
|
+
type: 'object',
|
|
586
|
+
properties: {},
|
|
587
|
+
},
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
name: 'task_heartbeat',
|
|
591
|
+
description: 'Extend the lock on a claimed task. Use to prevent timeout while still working.',
|
|
592
|
+
inputSchema: {
|
|
593
|
+
type: 'object',
|
|
594
|
+
properties: {
|
|
595
|
+
task_id: {
|
|
596
|
+
type: 'string',
|
|
597
|
+
description: 'The task ID to extend lock for',
|
|
598
|
+
},
|
|
599
|
+
agent_id: {
|
|
600
|
+
type: 'string',
|
|
601
|
+
description: 'Your agent identifier',
|
|
602
|
+
},
|
|
603
|
+
extend_minutes: {
|
|
604
|
+
type: 'number',
|
|
605
|
+
description: 'Minutes to extend the lock (default: 30)',
|
|
606
|
+
},
|
|
607
|
+
},
|
|
608
|
+
required: ['task_id', 'agent_id'],
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
// =========================================================================
|
|
612
|
+
// ORCHESTRATION TOOLS
|
|
613
|
+
// =========================================================================
|
|
614
|
+
{
|
|
615
|
+
name: 'task_dispatch',
|
|
616
|
+
description: 'ORCHESTRATION: Get all tasks ready for parallel execution. Returns tasks that are unblocked, matched to expert workers, with full context. Use this to spawn worker agents.',
|
|
617
|
+
inputSchema: {
|
|
618
|
+
type: 'object',
|
|
619
|
+
properties: {
|
|
620
|
+
epic_id: {
|
|
621
|
+
type: 'string',
|
|
622
|
+
description: 'Epic ID to dispatch tasks from (optional - if not provided, gets all ready tasks)',
|
|
623
|
+
},
|
|
624
|
+
max_parallel: {
|
|
625
|
+
type: 'number',
|
|
626
|
+
description: 'Maximum number of tasks to dispatch at once (default: 5)',
|
|
627
|
+
},
|
|
628
|
+
},
|
|
629
|
+
},
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
name: 'task_execute',
|
|
633
|
+
description: 'ORCHESTRATION: Get complete execution context for a worker agent. Returns task details, parent context, expert prompt, and all attached context.',
|
|
634
|
+
inputSchema: {
|
|
635
|
+
type: 'object',
|
|
636
|
+
properties: {
|
|
637
|
+
task_id: {
|
|
638
|
+
type: 'string',
|
|
639
|
+
description: 'The task ID to get execution context for',
|
|
640
|
+
},
|
|
641
|
+
},
|
|
642
|
+
required: ['task_id'],
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
name: 'task_resolve_dependencies',
|
|
647
|
+
description: 'ORCHESTRATION: Check which tasks are now unblocked after a task completion. Returns newly ready tasks that can be dispatched.',
|
|
648
|
+
inputSchema: {
|
|
649
|
+
type: 'object',
|
|
650
|
+
properties: {
|
|
651
|
+
completed_task_id: {
|
|
652
|
+
type: 'string',
|
|
653
|
+
description: 'The task ID that was just completed',
|
|
654
|
+
},
|
|
655
|
+
epic_id: {
|
|
656
|
+
type: 'string',
|
|
657
|
+
description: 'Epic ID to scope the dependency check',
|
|
658
|
+
},
|
|
659
|
+
},
|
|
660
|
+
required: ['completed_task_id'],
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
name: 'task_list_workers',
|
|
665
|
+
description: 'List all available expert worker types and their capabilities.',
|
|
666
|
+
inputSchema: {
|
|
667
|
+
type: 'object',
|
|
668
|
+
properties: {},
|
|
669
|
+
},
|
|
670
|
+
},
|
|
671
|
+
// =========================================================================
|
|
672
|
+
// CODEBASE MAPPING TOOLS
|
|
673
|
+
// =========================================================================
|
|
674
|
+
{
|
|
675
|
+
name: 'codebase_map',
|
|
676
|
+
description: 'Get a compact markdown map of the codebase for quick navigation. Shows entry points, directories, key files, and important symbols. Use this FIRST when exploring an unfamiliar codebase.',
|
|
677
|
+
inputSchema: {
|
|
678
|
+
type: 'object',
|
|
679
|
+
properties: {
|
|
680
|
+
project_id: {
|
|
681
|
+
type: 'string',
|
|
682
|
+
description: 'Project ID (optional, uses current project if not specified)',
|
|
683
|
+
},
|
|
684
|
+
},
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: 'codebase_find',
|
|
689
|
+
description: 'Search the codebase for symbols, files, or directories by name or pattern. Much faster than grep for finding where things are defined.',
|
|
690
|
+
inputSchema: {
|
|
691
|
+
type: 'object',
|
|
692
|
+
properties: {
|
|
693
|
+
query: {
|
|
694
|
+
type: 'string',
|
|
695
|
+
description: 'Search query (symbol name, file name, or pattern)',
|
|
696
|
+
},
|
|
697
|
+
type: {
|
|
698
|
+
type: 'string',
|
|
699
|
+
enum: ['symbol', 'file', 'directory', 'all'],
|
|
700
|
+
description: 'Type of thing to search for (default: all)',
|
|
701
|
+
},
|
|
702
|
+
exported: {
|
|
703
|
+
type: 'boolean',
|
|
704
|
+
description: 'If searching symbols, only return exported ones',
|
|
705
|
+
},
|
|
706
|
+
limit: {
|
|
707
|
+
type: 'number',
|
|
708
|
+
description: 'Maximum results to return (default: 20)',
|
|
709
|
+
},
|
|
710
|
+
},
|
|
711
|
+
required: ['query'],
|
|
712
|
+
},
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
name: 'codebase_context',
|
|
716
|
+
description: 'Get detailed context for a specific file or symbol, including dependencies, dependents, and call graph connections.',
|
|
717
|
+
inputSchema: {
|
|
718
|
+
type: 'object',
|
|
719
|
+
properties: {
|
|
720
|
+
target: {
|
|
721
|
+
type: 'string',
|
|
722
|
+
description: 'File path or symbol name to get context for',
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
required: ['target'],
|
|
726
|
+
},
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
name: 'codebase_callgraph',
|
|
730
|
+
description: 'Get the call graph for a function - what it calls and what calls it. Useful for understanding impact of changes.',
|
|
731
|
+
inputSchema: {
|
|
732
|
+
type: 'object',
|
|
733
|
+
properties: {
|
|
734
|
+
function_name: {
|
|
735
|
+
type: 'string',
|
|
736
|
+
description: 'Function name to get call graph for',
|
|
737
|
+
},
|
|
738
|
+
depth: {
|
|
739
|
+
type: 'number',
|
|
740
|
+
description: 'How many levels deep to traverse (default: 1, max: 3)',
|
|
741
|
+
},
|
|
742
|
+
},
|
|
743
|
+
required: ['function_name'],
|
|
744
|
+
},
|
|
745
|
+
},
|
|
746
|
+
],
|
|
747
|
+
}));
|
|
748
|
+
}
|