@artyfacts/mcp-server 1.1.1 → 1.1.2

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.
@@ -0,0 +1,620 @@
1
+ // src/server.ts
2
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import {
5
+ CallToolRequestSchema,
6
+ ListToolsRequestSchema
7
+ } from "@modelcontextprotocol/sdk/types.js";
8
+ var ARTYFACTS_TOOLS = [
9
+ // Organization tools
10
+ {
11
+ name: "get_organization",
12
+ description: "Get details about the current organization",
13
+ inputSchema: {
14
+ type: "object",
15
+ properties: {},
16
+ required: []
17
+ }
18
+ },
19
+ // Project tools
20
+ {
21
+ name: "list_projects",
22
+ description: "List all projects in the organization",
23
+ inputSchema: {
24
+ type: "object",
25
+ properties: {
26
+ limit: { type: "number", description: "Max results (default 50)" },
27
+ offset: { type: "number", description: "Pagination offset" }
28
+ },
29
+ required: []
30
+ }
31
+ },
32
+ {
33
+ name: "get_project",
34
+ description: "Get details about a specific project",
35
+ inputSchema: {
36
+ type: "object",
37
+ properties: {
38
+ project_id: { type: "string", description: "Project ID" }
39
+ },
40
+ required: ["project_id"]
41
+ }
42
+ },
43
+ // Artifact tools
44
+ {
45
+ name: "list_artifacts",
46
+ description: "List artifacts, optionally filtered by project",
47
+ inputSchema: {
48
+ type: "object",
49
+ properties: {
50
+ project_id: { type: "string", description: "Filter by project" },
51
+ type: { type: "string", description: "Filter by type (goal, spec, research, etc.)" },
52
+ status: { type: "string", description: "Filter by status" },
53
+ limit: { type: "number", description: "Max results" }
54
+ },
55
+ required: []
56
+ }
57
+ },
58
+ {
59
+ name: "get_artifact",
60
+ description: "Get a specific artifact by ID",
61
+ inputSchema: {
62
+ type: "object",
63
+ properties: {
64
+ artifact_id: { type: "string", description: "Artifact ID" }
65
+ },
66
+ required: ["artifact_id"]
67
+ }
68
+ },
69
+ {
70
+ name: "create_artifact",
71
+ description: "Create a new artifact (document, goal, spec, etc.)",
72
+ inputSchema: {
73
+ type: "object",
74
+ properties: {
75
+ title: { type: "string", description: "Artifact title" },
76
+ type: { type: "string", description: "Artifact type: goal, spec, research, report, experiment, decision, doc" },
77
+ content: { type: "string", description: "Markdown content" },
78
+ parent_id: { type: "string", description: "Parent artifact ID for nested artifacts" },
79
+ tags: { type: "array", items: { type: "string" }, description: "Tags for categorization" }
80
+ },
81
+ required: ["title", "type"]
82
+ }
83
+ },
84
+ {
85
+ name: "update_artifact",
86
+ description: "Update an existing artifact",
87
+ inputSchema: {
88
+ type: "object",
89
+ properties: {
90
+ artifact_id: { type: "string", description: "Artifact ID" },
91
+ title: { type: "string", description: "New title" },
92
+ content: { type: "string", description: "New content" },
93
+ status: { type: "string", description: "New status" }
94
+ },
95
+ required: ["artifact_id"]
96
+ }
97
+ },
98
+ // Section tools
99
+ {
100
+ name: "list_sections",
101
+ description: "List sections of an artifact",
102
+ inputSchema: {
103
+ type: "object",
104
+ properties: {
105
+ artifact_id: { type: "string", description: "Artifact ID" }
106
+ },
107
+ required: ["artifact_id"]
108
+ }
109
+ },
110
+ {
111
+ name: "get_section",
112
+ description: "Get a specific section",
113
+ inputSchema: {
114
+ type: "object",
115
+ properties: {
116
+ artifact_id: { type: "string", description: "Artifact ID" },
117
+ section_id: { type: "string", description: "Section ID" }
118
+ },
119
+ required: ["artifact_id", "section_id"]
120
+ }
121
+ },
122
+ {
123
+ name: "create_section",
124
+ description: "Create a new section on an artifact",
125
+ inputSchema: {
126
+ type: "object",
127
+ properties: {
128
+ artifact_id: { type: "string", description: "Artifact ID" },
129
+ section_id: { type: "string", description: "Section identifier (slug)" },
130
+ heading: { type: "string", description: "Section heading" },
131
+ content: { type: "string", description: "Markdown content" },
132
+ type: { type: "string", description: "Type: content, task, decision, blocker" },
133
+ position: { type: "number", description: "Order position" }
134
+ },
135
+ required: ["artifact_id", "section_id", "heading", "content"]
136
+ }
137
+ },
138
+ {
139
+ name: "update_section",
140
+ description: "Update an existing section",
141
+ inputSchema: {
142
+ type: "object",
143
+ properties: {
144
+ artifact_id: { type: "string", description: "Artifact ID" },
145
+ section_id: { type: "string", description: "Section ID" },
146
+ heading: { type: "string", description: "New heading" },
147
+ content: { type: "string", description: "New content" },
148
+ task_status: { type: "string", description: "Task status if type=task" }
149
+ },
150
+ required: ["artifact_id", "section_id"]
151
+ }
152
+ },
153
+ {
154
+ name: "delete_section",
155
+ description: "Delete a section",
156
+ inputSchema: {
157
+ type: "object",
158
+ properties: {
159
+ artifact_id: { type: "string", description: "Artifact ID" },
160
+ section_id: { type: "string", description: "Section ID" }
161
+ },
162
+ required: ["artifact_id", "section_id"]
163
+ }
164
+ },
165
+ // Task tools
166
+ {
167
+ name: "list_tasks",
168
+ description: "List tasks (sections with type=task)",
169
+ inputSchema: {
170
+ type: "object",
171
+ properties: {
172
+ artifact_id: { type: "string", description: "Filter by artifact" },
173
+ status: { type: "string", description: "Filter by status: pending, in_progress, done, blocked" },
174
+ assignee: { type: "string", description: "Filter by assignee agent" }
175
+ },
176
+ required: []
177
+ }
178
+ },
179
+ {
180
+ name: "claim_task",
181
+ description: "Claim a task for the current agent",
182
+ inputSchema: {
183
+ type: "object",
184
+ properties: {
185
+ task_id: { type: "string", description: "Task ID (section UUID)" }
186
+ },
187
+ required: ["task_id"]
188
+ }
189
+ },
190
+ {
191
+ name: "complete_task",
192
+ description: "Mark a task as complete. Always pass output_artifact_id if you created an artifact. Always pass output_references listing every entity you created or touched.",
193
+ inputSchema: {
194
+ type: "object",
195
+ properties: {
196
+ task_id: { type: "string", description: "Task ID" },
197
+ output_text: { type: "string", description: "Completion summary / what was done" },
198
+ output_url: { type: "string", description: "URL to deliverable (PR, doc, etc.)" },
199
+ output_artifact_id: { type: "string", description: "UUID of the primary artifact produced by this task" },
200
+ output_references: {
201
+ type: "array",
202
+ description: "All entities created or interacted with: artifacts, tasks, agents, goals",
203
+ items: {
204
+ type: "object",
205
+ properties: {
206
+ type: { type: "string", description: "artifact | task | agent | goal" },
207
+ id: { type: "string", description: "Entity UUID" },
208
+ title: { type: "string", description: "Display name for the reference card" },
209
+ subtitle: { type: "string", description: "Optional: type label, status, role, etc." }
210
+ },
211
+ required: ["type", "id", "title"]
212
+ }
213
+ }
214
+ },
215
+ required: ["task_id"]
216
+ }
217
+ },
218
+ {
219
+ name: "block_task",
220
+ description: "Mark a task as blocked",
221
+ inputSchema: {
222
+ type: "object",
223
+ properties: {
224
+ task_id: { type: "string", description: "Task ID" },
225
+ reason: { type: "string", description: "Why it is blocked" },
226
+ blocker_type: { type: "string", description: "Type: decision, dependency, resource, external" }
227
+ },
228
+ required: ["task_id", "reason"]
229
+ }
230
+ },
231
+ {
232
+ name: "create_task",
233
+ description: "Create a new task under a goal. Use this to create actionable tasks \u2014 NOT create_artifact or create_section.",
234
+ inputSchema: {
235
+ type: "object",
236
+ properties: {
237
+ goal_id: { type: "string", description: "The goal UUID this task belongs to (required)" },
238
+ title: { type: "string", description: "Task title" },
239
+ description: { type: "string", description: "Task description / what needs to be done" },
240
+ priority: { type: "string", description: "Priority: low, medium, high, urgent" },
241
+ assigned_to: { type: "string", description: "Agent UUID to assign the task to" },
242
+ depends_on: { type: "array", items: { type: "string" }, description: "List of task UUIDs this task depends on" },
243
+ estimated_minutes: { type: "number", description: "Estimated time in minutes" }
244
+ },
245
+ required: ["goal_id", "title"]
246
+ }
247
+ },
248
+ // Agent tools
249
+ {
250
+ name: "list_agents",
251
+ description: "List all agents in the organization",
252
+ inputSchema: {
253
+ type: "object",
254
+ properties: {
255
+ status: { type: "string", description: "Filter by status: active, inactive" }
256
+ },
257
+ required: []
258
+ }
259
+ },
260
+ {
261
+ name: "get_agent",
262
+ description: "Get details about an agent",
263
+ inputSchema: {
264
+ type: "object",
265
+ properties: {
266
+ agent_id: { type: "string", description: "Agent ID" }
267
+ },
268
+ required: ["agent_id"]
269
+ }
270
+ },
271
+ {
272
+ name: "create_agent",
273
+ description: "Register a new AI agent with role, capabilities, and permissions",
274
+ inputSchema: {
275
+ type: "object",
276
+ properties: {
277
+ agentId: { type: "string", description: 'Unique agent ID (e.g., "engineering-agent", "qa-agent")' },
278
+ name: { type: "string", description: "Agent display name" },
279
+ role: { type: "string", description: "Role: pm, engineering, qa, research, content, design" },
280
+ description: { type: "string", description: "What this agent does - detailed description" },
281
+ capabilities: { type: "array", items: { type: "string" }, description: 'List of capabilities (e.g., ["code-review", "testing", "debugging"])' },
282
+ permissions: {
283
+ type: "object",
284
+ description: "Permission settings",
285
+ properties: {
286
+ write: { type: "boolean", description: "Can create/edit artifacts" },
287
+ delete: { type: "boolean", description: "Can delete artifacts" },
288
+ delegate_tasks: { type: "boolean", description: "Can assign tasks to other agents" }
289
+ }
290
+ },
291
+ systemPrompt: { type: "string", description: "System prompt for the agent" }
292
+ },
293
+ required: ["agentId", "name", "role", "description"]
294
+ }
295
+ },
296
+ {
297
+ name: "update_agent",
298
+ description: "Update an agent",
299
+ inputSchema: {
300
+ type: "object",
301
+ properties: {
302
+ agent_id: { type: "string", description: "Agent ID" },
303
+ name: { type: "string", description: "New name" },
304
+ status: { type: "string", description: "New status" },
305
+ config: { type: "object", description: "Updated config" }
306
+ },
307
+ required: ["agent_id"]
308
+ }
309
+ },
310
+ // Inbox tools (human-in-the-loop)
311
+ {
312
+ name: "create_inbox_item",
313
+ description: "Request human approval, a decision, or an answer before proceeding. Automatically blocks the task. Use for agent creation, risky actions, or anything requiring human sign-off.",
314
+ inputSchema: {
315
+ type: "object",
316
+ properties: {
317
+ task_id: { type: "string", description: "UUID of the task being blocked (required)" },
318
+ type: { type: "string", description: "Type: approval, decision, question" },
319
+ title: { type: "string", description: "Short summary shown to the human in the inbox" },
320
+ content: { type: "string", description: "Full context and details for the human" },
321
+ action: { type: "string", description: "Action to auto-execute if approved (e.g. agent.create)" },
322
+ action_payload: { type: "object", description: "Data for the action (e.g. full agent spec for agent.create)" },
323
+ options: { type: "array", description: "Options for decision type: [{id, label, description}]" }
324
+ },
325
+ required: ["task_id", "type", "title"]
326
+ }
327
+ },
328
+ {
329
+ name: "list_inbox",
330
+ description: "List pending inbox items (approvals, decisions, questions) waiting for human resolution.",
331
+ inputSchema: {
332
+ type: "object",
333
+ properties: {
334
+ status: { type: "string", description: "Filter by status: pending (default), resolved" },
335
+ type: { type: "string", description: "Filter by type: approval, decision, question" },
336
+ limit: { type: "number", description: "Max results (default 50)" }
337
+ },
338
+ required: []
339
+ }
340
+ },
341
+ {
342
+ name: "resolve_inbox",
343
+ description: "Resolve an inbox item from the agent side. Humans resolve via the UI \u2014 only use this for automated resolution.",
344
+ inputSchema: {
345
+ type: "object",
346
+ properties: {
347
+ item_id: { type: "string", description: "Inbox item UUID" },
348
+ approved: { type: "boolean", description: "For approvals: true to approve, false to deny" },
349
+ chosen_option: { type: "string", description: "For decisions: the selected option ID" },
350
+ answer: { type: "string", description: "For questions: the answer text" },
351
+ notes: { type: "string", description: "Optional notes" }
352
+ },
353
+ required: ["item_id"]
354
+ }
355
+ },
356
+ // Search tools
357
+ {
358
+ name: "search_artifacts",
359
+ description: "Search artifacts by text query",
360
+ inputSchema: {
361
+ type: "object",
362
+ properties: {
363
+ query: { type: "string", description: "Search query" },
364
+ type: { type: "string", description: "Filter by type" },
365
+ limit: { type: "number", description: "Max results" }
366
+ },
367
+ required: ["query"]
368
+ }
369
+ },
370
+ // Context tools
371
+ {
372
+ name: "get_task_context",
373
+ description: "Get full context for a task (org, project, artifact, related sections)",
374
+ inputSchema: {
375
+ type: "object",
376
+ properties: {
377
+ task_id: { type: "string", description: "Task ID" }
378
+ },
379
+ required: ["task_id"]
380
+ }
381
+ }
382
+ ];
383
+ var ArtyfactsApiClient = class {
384
+ constructor(baseUrl, apiKey) {
385
+ this.baseUrl = baseUrl;
386
+ this.apiKey = apiKey;
387
+ }
388
+ async request(method, path, body) {
389
+ const url = `${this.baseUrl}${path}`;
390
+ const response = await fetch(url, {
391
+ method,
392
+ headers: {
393
+ "Authorization": `Bearer ${this.apiKey}`,
394
+ "Content-Type": "application/json"
395
+ },
396
+ body: body ? JSON.stringify(body) : void 0
397
+ });
398
+ if (!response.ok) {
399
+ const error = await response.json().catch(() => ({ error: "Request failed" }));
400
+ throw new Error(error.error || `HTTP ${response.status}: ${response.statusText}`);
401
+ }
402
+ return response.json();
403
+ }
404
+ get(path) {
405
+ return this.request("GET", path);
406
+ }
407
+ post(path, body) {
408
+ return this.request("POST", path, body);
409
+ }
410
+ patch(path, body) {
411
+ return this.request("PATCH", path, body);
412
+ }
413
+ delete(path) {
414
+ return this.request("DELETE", path);
415
+ }
416
+ };
417
+ var toolHandlers = {
418
+ // Organization
419
+ get_organization: (client) => client.get("/org"),
420
+ // Projects
421
+ list_projects: (client, args) => {
422
+ const params = new URLSearchParams();
423
+ if (args.limit) params.set("limit", String(args.limit));
424
+ if (args.offset) params.set("offset", String(args.offset));
425
+ return client.get(`/projects?${params}`);
426
+ },
427
+ get_project: (client, args) => client.get(`/projects/${args.project_id}`),
428
+ // Artifacts
429
+ list_artifacts: (client, args) => {
430
+ const params = new URLSearchParams();
431
+ if (args.project_id) params.set("project_id", String(args.project_id));
432
+ if (args.type) params.set("type", String(args.type));
433
+ if (args.status) params.set("status", String(args.status));
434
+ if (args.limit) params.set("limit", String(args.limit));
435
+ return client.get(`/artifacts?${params}`);
436
+ },
437
+ get_artifact: (client, args) => client.get(`/artifacts/${args.artifact_id}`),
438
+ create_artifact: (client, args) => {
439
+ const envelope = {
440
+ aah_version: "0.3",
441
+ artifact: {
442
+ id: args.id || `artifact-${Date.now()}`,
443
+ title: args.title,
444
+ type: args.type || "document/sectioned",
445
+ artifact_type: args.artifact_type || args.type || "doc",
446
+ parent_id: args.parent_id,
447
+ tags: args.tags
448
+ },
449
+ content: args.content ? {
450
+ media_type: "text/markdown",
451
+ body: args.content
452
+ } : void 0,
453
+ source: {
454
+ agent_id: "mcp-agent"
455
+ }
456
+ };
457
+ return client.post("/artifacts", envelope);
458
+ },
459
+ update_artifact: (client, args) => {
460
+ const { artifact_id, ...body } = args;
461
+ return client.patch(`/artifacts/${artifact_id}`, body);
462
+ },
463
+ // Sections
464
+ list_sections: (client, args) => client.get(`/artifacts/${args.artifact_id}/sections`),
465
+ get_section: (client, args) => client.get(`/artifacts/${args.artifact_id}/sections/${args.section_id}`),
466
+ create_section: (client, args) => {
467
+ const { artifact_id, section_id, ...rest } = args;
468
+ const body = { id: section_id, ...rest };
469
+ return client.post(`/artifacts/${artifact_id}/sections`, body);
470
+ },
471
+ update_section: (client, args) => {
472
+ const { artifact_id, section_id, ...body } = args;
473
+ return client.patch(`/artifacts/${artifact_id}/sections/${section_id}`, body);
474
+ },
475
+ delete_section: (client, args) => client.delete(`/artifacts/${args.artifact_id}/sections/${args.section_id}`),
476
+ // Tasks
477
+ list_tasks: (client, args) => {
478
+ const params = new URLSearchParams();
479
+ if (args.artifact_id) params.set("artifact_id", String(args.artifact_id));
480
+ if (args.status) params.set("status", String(args.status));
481
+ if (args.assignee) params.set("assignee", String(args.assignee));
482
+ return client.get(`/tasks?${params}`);
483
+ },
484
+ claim_task: (client, args) => client.post(`/tasks/${args.task_id}/claim`),
485
+ complete_task: (client, args) => {
486
+ const { task_id, ...body } = args;
487
+ return client.post(`/tasks/${task_id}/complete`, body);
488
+ },
489
+ block_task: (client, args) => {
490
+ const { task_id, ...body } = args;
491
+ return client.post(`/tasks/${task_id}/block`, body);
492
+ },
493
+ create_task: (client, args) => {
494
+ const { goal_id, title, description, priority, assigned_to, depends_on, estimated_minutes } = args;
495
+ return client.post("/tasks", { goal_id, title, description, priority, assigned_to, depends_on, estimated_minutes });
496
+ },
497
+ // Agents
498
+ list_agents: (client, args) => {
499
+ const params = new URLSearchParams();
500
+ if (args.status) params.set("status", String(args.status));
501
+ return client.get(`/agents?${params}`);
502
+ },
503
+ get_agent: (client, args) => client.get(`/agents/${args.agent_id}`),
504
+ create_agent: (client, args) => {
505
+ const body = {
506
+ agentId: args.agentId,
507
+ name: args.name,
508
+ role: args.role,
509
+ description: args.description,
510
+ permissions: args.permissions || { write: true, delete: false, delegate_tasks: false },
511
+ metadata: {
512
+ capabilities: args.capabilities || [],
513
+ systemPrompt: args.systemPrompt,
514
+ createdVia: "mcp"
515
+ }
516
+ };
517
+ return client.post("/agents", body);
518
+ },
519
+ update_agent: (client, args) => {
520
+ const { agent_id, ...body } = args;
521
+ return client.patch(`/agents/${agent_id}`, body);
522
+ },
523
+ // Inbox (human-in-the-loop)
524
+ create_inbox_item: (client, args) => {
525
+ const { task_id, type, title, content, action, action_payload, options } = args;
526
+ return client.post("/inbox", { task_id, type, title, content, action, action_payload, options });
527
+ },
528
+ list_inbox: (client, args) => {
529
+ const params = new URLSearchParams();
530
+ if (args.status) params.set("status", String(args.status));
531
+ if (args.type) params.set("type", String(args.type));
532
+ if (args.limit) params.set("limit", String(args.limit));
533
+ return client.get(`/inbox?${params}`);
534
+ },
535
+ resolve_inbox: (client, args) => {
536
+ const { item_id, ...body } = args;
537
+ return client.post(`/inbox/${item_id}/resolve`, body);
538
+ },
539
+ // Search
540
+ search_artifacts: (client, args) => {
541
+ const params = new URLSearchParams();
542
+ params.set("q", String(args.query));
543
+ if (args.type) params.set("type", String(args.type));
544
+ if (args.limit) params.set("limit", String(args.limit));
545
+ return client.get(`/search?${params}`);
546
+ },
547
+ // Context
548
+ get_task_context: (client, args) => client.get(`/tasks/${args.task_id}/context`)
549
+ };
550
+ var ArtyfactsMcpServer = class {
551
+ server;
552
+ client;
553
+ config;
554
+ constructor(config) {
555
+ this.config = config;
556
+ this.client = new ArtyfactsApiClient(
557
+ config.baseUrl || "https://artyfacts.dev/api/v1",
558
+ config.apiKey
559
+ );
560
+ this.server = new Server(
561
+ {
562
+ name: config.name || "artyfacts-mcp",
563
+ version: config.version || "1.0.0"
564
+ },
565
+ {
566
+ capabilities: {
567
+ tools: {}
568
+ }
569
+ }
570
+ );
571
+ this.setupHandlers();
572
+ }
573
+ setupHandlers() {
574
+ this.server.setRequestHandler(ListToolsRequestSchema, async () => {
575
+ return { tools: ARTYFACTS_TOOLS };
576
+ });
577
+ this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
578
+ const { name, arguments: args } = request.params;
579
+ const handler = toolHandlers[name];
580
+ if (!handler) {
581
+ return {
582
+ content: [{ type: "text", text: `Unknown tool: ${name}` }],
583
+ isError: true
584
+ };
585
+ }
586
+ try {
587
+ const result = await handler(this.client, args || {});
588
+ return {
589
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
590
+ };
591
+ } catch (error) {
592
+ const message = error instanceof Error ? error.message : String(error);
593
+ return {
594
+ content: [{ type: "text", text: `Error: ${message}` }],
595
+ isError: true
596
+ };
597
+ }
598
+ });
599
+ }
600
+ async start() {
601
+ const transport = new StdioServerTransport();
602
+ await this.server.connect(transport);
603
+ console.error(`Artyfacts MCP server running (${ARTYFACTS_TOOLS.length} tools)`);
604
+ }
605
+ getServer() {
606
+ return this.server;
607
+ }
608
+ };
609
+ function createMcpServer(config) {
610
+ return new ArtyfactsMcpServer(config);
611
+ }
612
+ async function startServer(server) {
613
+ await server.start();
614
+ }
615
+
616
+ export {
617
+ ArtyfactsMcpServer,
618
+ createMcpServer,
619
+ startServer
620
+ };
package/dist/index.cjs CHANGED
@@ -214,14 +214,28 @@ var ARTYFACTS_TOOLS = [
214
214
  },
215
215
  {
216
216
  name: "complete_task",
217
- description: "Mark a task as complete",
217
+ description: "Mark a task as complete. Always pass output_artifact_id if you created an artifact. Always pass output_references listing every entity you created or touched.",
218
218
  inputSchema: {
219
219
  type: "object",
220
220
  properties: {
221
221
  task_id: { type: "string", description: "Task ID" },
222
222
  output_text: { type: "string", description: "Completion summary / what was done" },
223
223
  output_url: { type: "string", description: "URL to deliverable (PR, doc, etc.)" },
224
- output_artifact_id: { type: "string", description: "UUID of artifact produced by this task" }
224
+ output_artifact_id: { type: "string", description: "UUID of the primary artifact produced by this task" },
225
+ output_references: {
226
+ type: "array",
227
+ description: "All entities created or interacted with: artifacts, tasks, agents, goals",
228
+ items: {
229
+ type: "object",
230
+ properties: {
231
+ type: { type: "string", description: "artifact | task | agent | goal" },
232
+ id: { type: "string", description: "Entity UUID" },
233
+ title: { type: "string", description: "Display name for the reference card" },
234
+ subtitle: { type: "string", description: "Optional: type label, status, role, etc." }
235
+ },
236
+ required: ["type", "id", "title"]
237
+ }
238
+ }
225
239
  },
226
240
  required: ["task_id"]
227
241
  }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  ArtyfactsMcpServer,
3
3
  createMcpServer,
4
4
  startServer
5
- } from "./chunk-XJM3QWEZ.js";
5
+ } from "./chunk-324EM5A4.js";
6
6
  export {
7
7
  ArtyfactsMcpServer,
8
8
  createMcpServer,
package/dist/server.cjs CHANGED
@@ -212,14 +212,28 @@ var ARTYFACTS_TOOLS = [
212
212
  },
213
213
  {
214
214
  name: "complete_task",
215
- description: "Mark a task as complete",
215
+ description: "Mark a task as complete. Always pass output_artifact_id if you created an artifact. Always pass output_references listing every entity you created or touched.",
216
216
  inputSchema: {
217
217
  type: "object",
218
218
  properties: {
219
219
  task_id: { type: "string", description: "Task ID" },
220
220
  output_text: { type: "string", description: "Completion summary / what was done" },
221
221
  output_url: { type: "string", description: "URL to deliverable (PR, doc, etc.)" },
222
- output_artifact_id: { type: "string", description: "UUID of artifact produced by this task" }
222
+ output_artifact_id: { type: "string", description: "UUID of the primary artifact produced by this task" },
223
+ output_references: {
224
+ type: "array",
225
+ description: "All entities created or interacted with: artifacts, tasks, agents, goals",
226
+ items: {
227
+ type: "object",
228
+ properties: {
229
+ type: { type: "string", description: "artifact | task | agent | goal" },
230
+ id: { type: "string", description: "Entity UUID" },
231
+ title: { type: "string", description: "Display name for the reference card" },
232
+ subtitle: { type: "string", description: "Optional: type label, status, role, etc." }
233
+ },
234
+ required: ["type", "id", "title"]
235
+ }
236
+ }
223
237
  },
224
238
  required: ["task_id"]
225
239
  }
package/dist/server.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  ArtyfactsMcpServer,
3
3
  createMcpServer,
4
4
  startServer
5
- } from "./chunk-XJM3QWEZ.js";
5
+ } from "./chunk-324EM5A4.js";
6
6
  export {
7
7
  ArtyfactsMcpServer,
8
8
  createMcpServer,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artyfacts/mcp-server",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "MCP server exposing Artyfacts tools for Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/server.ts CHANGED
@@ -220,14 +220,28 @@ const ARTYFACTS_TOOLS: Tool[] = [
220
220
  },
221
221
  {
222
222
  name: 'complete_task',
223
- description: 'Mark a task as complete',
223
+ description: 'Mark a task as complete. Always pass output_artifact_id if you created an artifact. Always pass output_references listing every entity you created or touched.',
224
224
  inputSchema: {
225
225
  type: 'object',
226
226
  properties: {
227
227
  task_id: { type: 'string', description: 'Task ID' },
228
228
  output_text: { type: 'string', description: 'Completion summary / what was done' },
229
229
  output_url: { type: 'string', description: 'URL to deliverable (PR, doc, etc.)' },
230
- output_artifact_id: { type: 'string', description: 'UUID of artifact produced by this task' },
230
+ output_artifact_id: { type: 'string', description: 'UUID of the primary artifact produced by this task' },
231
+ output_references: {
232
+ type: 'array',
233
+ description: 'All entities created or interacted with: artifacts, tasks, agents, goals',
234
+ items: {
235
+ type: 'object',
236
+ properties: {
237
+ type: { type: 'string', description: 'artifact | task | agent | goal' },
238
+ id: { type: 'string', description: 'Entity UUID' },
239
+ title: { type: 'string', description: 'Display name for the reference card' },
240
+ subtitle: { type: 'string', description: 'Optional: type label, status, role, etc.' },
241
+ },
242
+ required: ['type', 'id', 'title'],
243
+ },
244
+ },
231
245
  },
232
246
  required: ['task_id'],
233
247
  },