⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.
TypeScript agenticagileai-agentsbug-reportingbug-trackerganttissue-trackerjirajira-alternativekanbanlinearlinear-alternativeopen-sourceproduct-managementproject-managementroadmapself-hostedsprint-planningteam-collaborationtrello-alternative
feat(api): expose checklist routes as MCP tools (#229)
Denisc2317f7dfc75
diff --git a/apps/api/src/mcp/instructions.ts b/apps/api/src/mcp/instructions.tsindex 2f3cde2d..fb8eae73 100644--- a/apps/api/src/mcp/instructions.ts+++ b/apps/api/src/mcp/instructions.ts@@ -23,6 +23,9 @@ labelIds, assigneeUserId, custom field ids, member user ids — comes fromget_project. Never invent an id, and never reuse one across projects: ids are perproject.+A checklistId and a checklist item's id come from get_issue: an issue carries its+checklists and their items.+search_issues and list_issues are for finding issues by text or by field, not forresolving an identifier.diff --git a/apps/api/src/modules/agents/core/runtime/tools/catalog.ts b/apps/api/src/modules/agents/core/runtime/tools/catalog.tsindex 29bdd67b..6c30cada 100644--- a/apps/api/src/modules/agents/core/runtime/tools/catalog.ts+++ b/apps/api/src/modules/agents/core/runtime/tools/catalog.ts@@ -111,6 +111,34 @@ export const AGENT_ACTIONS: ToolMeta[] = [description: 'Delete file attachments from issues.',always: false,},+ {+ key: 'create_checklist',+ group: 'issues',+ label: 'Add checklists',+ description: 'Add a checklist to an issue. It starts empty; its items are added separately.',+ always: false,+ },+ {+ key: 'create_checklist_item',+ group: 'issues',+ label: 'Add checklist items',+ description: 'Append an item to a checklist on an issue.',+ always: false,+ },+ {+ key: 'update_checklist_item',+ group: 'issues',+ label: 'Update checklist items',+ description: "Change a checklist item's text, tick it off, or untick it.",+ always: false,+ },+ {+ key: 'delete_checklist_item',+ group: 'issues',+ label: 'Delete checklist items',+ description: 'Remove one item from a checklist.',+ always: false,+ },{key: 'create_initiative',group: 'initiatives',diff --git a/apps/api/src/modules/issues/__tests__/integration/checklists.test.ts b/apps/api/src/modules/issues/__tests__/integration/checklists.test.tsindex b16a0479..e6761c9f 100644--- a/apps/api/src/modules/issues/__tests__/integration/checklists.test.ts+++ b/apps/api/src/modules/issues/__tests__/integration/checklists.test.ts@@ -2,6 +2,7 @@ import { describe, it, expect, beforeEach } from 'bun:test';import { authedApi, type Api } from '#tests/helpers/app';import { signUpTestUser } from '#tests/helpers/auth';import { resetDb } from '#tests/helpers/db';+import { untaggedRoutes } from '#tests/helpers/mcp';// Checklists: an issue holds several checklists, each holding checkbox items. Both// are ordered by position within their parent and come back with the issue read@@ -371,4 +372,18 @@ describe('checklists', () => {expect(await feedActions(asOwner, issue.id)).toEqual(before);});});++ // An agent fills a checklist in over MCP, so the writes it needs are tagged. The+ // rest stay session-only: the list comes with the issue read, order is a drag in+ // the UI, and removing a checklist takes its items with it, including ones a+ // person wrote.+ it('exposes the checklist writes an agent needs to MCP', () => {+ expect(untaggedRoutes((route) => route.includes('checklist'))).toEqual([+ 'GET /issues/:issueId/checklists',+ 'PUT /issues/:issueId/checklists/reorder',+ 'PATCH /checklists/:checklistId',+ 'DELETE /checklists/:checklistId',+ 'PUT /checklists/:checklistId/items/reorder',+ ]);+ });});diff --git a/apps/api/src/modules/issues/index.ts b/apps/api/src/modules/issues/index.tsindex 64c2d6dd..0cc6288e 100644--- a/apps/api/src/modules/issues/index.ts+++ b/apps/api/src/modules/issues/index.ts@@ -688,6 +688,7 @@ export const issueRoutes = new Elysia({ name: 'issues', detail: { tags: ['Issuesdetail: {summary: 'Add a checklist',description: 'Add a checklist to an issue. It starts empty; add its items separately.',+ ...mcpTool('create_checklist'),},},)@@ -755,6 +756,7 @@ export const issueRoutes = new Elysia({ name: 'issues', detail: { tags: ['Issuesdetail: {summary: 'Add a checklist item',description: 'Append an item to a checklist.',+ ...mcpTool('create_checklist_item'),},},)@@ -787,6 +789,7 @@ export const issueRoutes = new Elysia({ name: 'issues', detail: { tags: ['Issuesdetail: {summary: 'Update a checklist item',description: "Change a checklist item's text, its checked state, or both.",+ ...mcpTool('update_checklist_item'),},},)@@ -805,6 +808,7 @@ export const issueRoutes = new Elysia({ name: 'issues', detail: { tags: ['Issuesdetail: {summary: 'Delete a checklist item',description: 'Remove one item from a checklist.',+ ...mcpTool('delete_checklist_item'),},},)