@omnicoreos/planka-mcp 0.2.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.
Files changed (126) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/CONTRIBUTING.md +37 -0
  3. package/CREDITS.md +39 -0
  4. package/LICENSE +22 -0
  5. package/README.es.md +213 -0
  6. package/README.md +213 -0
  7. package/dist/client.d.ts +96 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +281 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/errors.d.ts +85 -0
  12. package/dist/errors.d.ts.map +1 -0
  13. package/dist/errors.js +226 -0
  14. package/dist/errors.js.map +1 -0
  15. package/dist/identity.generated.d.ts +3 -0
  16. package/dist/identity.generated.d.ts.map +1 -0
  17. package/dist/identity.generated.js +4 -0
  18. package/dist/identity.generated.js.map +1 -0
  19. package/dist/index.d.ts +3 -0
  20. package/dist/index.d.ts.map +1 -0
  21. package/dist/index.js +93 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/operations/attachments.d.ts +34 -0
  24. package/dist/operations/attachments.d.ts.map +1 -0
  25. package/dist/operations/attachments.js +89 -0
  26. package/dist/operations/attachments.js.map +1 -0
  27. package/dist/operations/board-id.d.ts +9 -0
  28. package/dist/operations/board-id.d.ts.map +1 -0
  29. package/dist/operations/board-id.js +86 -0
  30. package/dist/operations/board-id.js.map +1 -0
  31. package/dist/operations/boards.d.ts +143 -0
  32. package/dist/operations/boards.d.ts.map +1 -0
  33. package/dist/operations/boards.js +391 -0
  34. package/dist/operations/boards.js.map +1 -0
  35. package/dist/operations/cards.d.ts +36 -0
  36. package/dist/operations/cards.d.ts.map +1 -0
  37. package/dist/operations/cards.js +81 -0
  38. package/dist/operations/cards.js.map +1 -0
  39. package/dist/operations/comments.d.ts +28 -0
  40. package/dist/operations/comments.d.ts.map +1 -0
  41. package/dist/operations/comments.js +53 -0
  42. package/dist/operations/comments.js.map +1 -0
  43. package/dist/operations/labels.d.ts +60 -0
  44. package/dist/operations/labels.d.ts.map +1 -0
  45. package/dist/operations/labels.js +146 -0
  46. package/dist/operations/labels.js.map +1 -0
  47. package/dist/operations/lists.d.ts +15 -0
  48. package/dist/operations/lists.d.ts.map +1 -0
  49. package/dist/operations/lists.js +40 -0
  50. package/dist/operations/lists.js.map +1 -0
  51. package/dist/operations/projects.d.ts +24 -0
  52. package/dist/operations/projects.d.ts.map +1 -0
  53. package/dist/operations/projects.js +61 -0
  54. package/dist/operations/projects.js.map +1 -0
  55. package/dist/operations/tasks.d.ts +30 -0
  56. package/dist/operations/tasks.d.ts.map +1 -0
  57. package/dist/operations/tasks.js +111 -0
  58. package/dist/operations/tasks.js.map +1 -0
  59. package/dist/schemas/entities.d.ts +389 -0
  60. package/dist/schemas/entities.d.ts.map +1 -0
  61. package/dist/schemas/entities.js +202 -0
  62. package/dist/schemas/entities.js.map +1 -0
  63. package/dist/schemas/requests.d.ts +539 -0
  64. package/dist/schemas/requests.d.ts.map +1 -0
  65. package/dist/schemas/requests.js +187 -0
  66. package/dist/schemas/requests.js.map +1 -0
  67. package/dist/schemas/responses.d.ts +2626 -0
  68. package/dist/schemas/responses.d.ts.map +1 -0
  69. package/dist/schemas/responses.js +75 -0
  70. package/dist/schemas/responses.js.map +1 -0
  71. package/dist/tools/attachments.d.ts +270 -0
  72. package/dist/tools/attachments.d.ts.map +1 -0
  73. package/dist/tools/attachments.js +247 -0
  74. package/dist/tools/attachments.js.map +1 -0
  75. package/dist/tools/cards.d.ts +401 -0
  76. package/dist/tools/cards.d.ts.map +1 -0
  77. package/dist/tools/cards.js +368 -0
  78. package/dist/tools/cards.js.map +1 -0
  79. package/dist/tools/comments.d.ts +217 -0
  80. package/dist/tools/comments.d.ts.map +1 -0
  81. package/dist/tools/comments.js +208 -0
  82. package/dist/tools/comments.js.map +1 -0
  83. package/dist/tools/index.d.ts +1293 -0
  84. package/dist/tools/index.d.ts.map +1 -0
  85. package/dist/tools/index.js +62 -0
  86. package/dist/tools/index.js.map +1 -0
  87. package/dist/tools/labels.d.ts +214 -0
  88. package/dist/tools/labels.d.ts.map +1 -0
  89. package/dist/tools/labels.js +302 -0
  90. package/dist/tools/labels.js.map +1 -0
  91. package/dist/tools/lists.d.ts +117 -0
  92. package/dist/tools/lists.d.ts.map +1 -0
  93. package/dist/tools/lists.js +178 -0
  94. package/dist/tools/lists.js.map +1 -0
  95. package/dist/tools/navigation.d.ts +106 -0
  96. package/dist/tools/navigation.d.ts.map +1 -0
  97. package/dist/tools/navigation.js +151 -0
  98. package/dist/tools/navigation.js.map +1 -0
  99. package/dist/tools/queries.d.ts +380 -0
  100. package/dist/tools/queries.d.ts.map +1 -0
  101. package/dist/tools/queries.js +256 -0
  102. package/dist/tools/queries.js.map +1 -0
  103. package/dist/tools/tasks.d.ts +223 -0
  104. package/dist/tools/tasks.d.ts.map +1 -0
  105. package/dist/tools/tasks.js +169 -0
  106. package/dist/tools/tasks.js.map +1 -0
  107. package/docs/planka-2x-gotchas.md +192 -0
  108. package/docs/tools.md +659 -0
  109. package/docs/troubleshooting.md +138 -0
  110. package/package.json +71 -0
  111. package/project.identity.json +7 -0
  112. package/scripts/bootstrap-board.mjs +160 -0
  113. package/scripts/lib/planka-api.mjs +244 -0
  114. package/scripts/lib/workflow-template.mjs +26 -0
  115. package/scripts/setup.mjs +236 -0
  116. package/scripts/setup.sh +48 -0
  117. package/scripts/sync-identity.mjs +57 -0
  118. package/server.json +43 -0
  119. package/tests/smoke/planka-smoke.mjs +920 -0
  120. package/workflow/README.md +232 -0
  121. package/workflow/board-template.md +115 -0
  122. package/workflow/skills/planka-close-card/SKILL.md +81 -0
  123. package/workflow/skills/planka-orchestrator/SKILL.md +126 -0
  124. package/workflow/worktrees/README.md +104 -0
  125. package/workflow/worktrees/wt.conf.example +24 -0
  126. package/workflow/worktrees/wt.sh +345 -0
@@ -0,0 +1,117 @@
1
+ /**
2
+ * Tool: planka_manage_lists
3
+ * Create, update, or delete lists on a board.
4
+ */
5
+ export declare const manageListsTool: {
6
+ name: string;
7
+ description: string;
8
+ inputSchema: {
9
+ type: "object";
10
+ properties: {
11
+ action: {
12
+ type: string;
13
+ enum: string[];
14
+ description: string;
15
+ };
16
+ boardId: {
17
+ type: string;
18
+ description: string;
19
+ };
20
+ listId: {
21
+ type: string;
22
+ description: string;
23
+ };
24
+ name: {
25
+ type: string;
26
+ description: string;
27
+ };
28
+ position: {
29
+ type: string;
30
+ description: string;
31
+ };
32
+ type: {
33
+ type: string;
34
+ enum: string[];
35
+ description: string;
36
+ };
37
+ };
38
+ required: string[];
39
+ };
40
+ handler: (params: {
41
+ action: "create" | "update" | "delete";
42
+ boardId?: string;
43
+ listId?: string;
44
+ name?: string;
45
+ position?: number;
46
+ type?: "active" | "closed";
47
+ }) => Promise<{
48
+ content: {
49
+ type: "text";
50
+ text: string;
51
+ }[];
52
+ isError: boolean;
53
+ } | {
54
+ content: {
55
+ type: "text";
56
+ text: string;
57
+ }[];
58
+ isError?: undefined;
59
+ }>;
60
+ };
61
+ export declare const listTools: {
62
+ name: string;
63
+ description: string;
64
+ inputSchema: {
65
+ type: "object";
66
+ properties: {
67
+ action: {
68
+ type: string;
69
+ enum: string[];
70
+ description: string;
71
+ };
72
+ boardId: {
73
+ type: string;
74
+ description: string;
75
+ };
76
+ listId: {
77
+ type: string;
78
+ description: string;
79
+ };
80
+ name: {
81
+ type: string;
82
+ description: string;
83
+ };
84
+ position: {
85
+ type: string;
86
+ description: string;
87
+ };
88
+ type: {
89
+ type: string;
90
+ enum: string[];
91
+ description: string;
92
+ };
93
+ };
94
+ required: string[];
95
+ };
96
+ handler: (params: {
97
+ action: "create" | "update" | "delete";
98
+ boardId?: string;
99
+ listId?: string;
100
+ name?: string;
101
+ position?: number;
102
+ type?: "active" | "closed";
103
+ }) => Promise<{
104
+ content: {
105
+ type: "text";
106
+ text: string;
107
+ }[];
108
+ isError: boolean;
109
+ } | {
110
+ content: {
111
+ type: "text";
112
+ text: string;
113
+ }[];
114
+ isError?: undefined;
115
+ }>;
116
+ }[];
117
+ //# sourceMappingURL=lists.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/tools/lists.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAmCF;QACtB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;QACvC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;KAC5B;;;;;;;;;;;;;CAqJF,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBA9JI;QACtB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;QACvC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;KAC5B;;;;;;;;;;;;;GAuJuC,CAAC"}
@@ -0,0 +1,178 @@
1
+ /**
2
+ * List tools for PLANKA MCP server.
3
+ */
4
+ import { createList, updateList, deleteList, } from "../operations/lists.js";
5
+ import { PlankaError } from "../errors.js";
6
+ /**
7
+ * Tool: planka_manage_lists
8
+ * Create, update, or delete lists on a board.
9
+ */
10
+ export const manageListsTool = {
11
+ name: "planka_manage_lists",
12
+ description: "Create, update, or delete lists on a board.",
13
+ inputSchema: {
14
+ type: "object",
15
+ properties: {
16
+ action: {
17
+ type: "string",
18
+ enum: ["create", "update", "delete"],
19
+ description: "Action to perform",
20
+ },
21
+ boardId: {
22
+ type: "string",
23
+ description: "Board ID (required for create)",
24
+ },
25
+ listId: {
26
+ type: "string",
27
+ description: "List ID (required for update/delete)",
28
+ },
29
+ name: {
30
+ type: "string",
31
+ description: "List name",
32
+ },
33
+ position: {
34
+ type: "number",
35
+ description: "List position",
36
+ },
37
+ type: {
38
+ type: "string",
39
+ enum: ["active", "closed"],
40
+ description: "List type. Defaults to active when creating.",
41
+ },
42
+ },
43
+ required: ["action"],
44
+ },
45
+ handler: async (params) => {
46
+ try {
47
+ switch (params.action) {
48
+ case "create": {
49
+ if (!params.boardId) {
50
+ return {
51
+ content: [
52
+ {
53
+ type: "text",
54
+ text: "Error: boardId is required for create action",
55
+ },
56
+ ],
57
+ isError: true,
58
+ };
59
+ }
60
+ if (!params.name) {
61
+ return {
62
+ content: [
63
+ {
64
+ type: "text",
65
+ text: "Error: name is required for create action",
66
+ },
67
+ ],
68
+ isError: true,
69
+ };
70
+ }
71
+ const list = await createList({
72
+ boardId: params.boardId,
73
+ name: params.name,
74
+ position: params.position,
75
+ type: params.type,
76
+ });
77
+ return {
78
+ content: [
79
+ {
80
+ type: "text",
81
+ text: JSON.stringify({
82
+ success: true,
83
+ list: {
84
+ id: list.id,
85
+ name: list.name,
86
+ position: list.position,
87
+ },
88
+ }, null, 2),
89
+ },
90
+ ],
91
+ };
92
+ }
93
+ case "update": {
94
+ if (!params.listId) {
95
+ return {
96
+ content: [
97
+ {
98
+ type: "text",
99
+ text: "Error: listId is required for update action",
100
+ },
101
+ ],
102
+ isError: true,
103
+ };
104
+ }
105
+ const updates = { listId: params.listId };
106
+ if (params.name !== undefined)
107
+ updates.name = params.name;
108
+ if (params.position !== undefined)
109
+ updates.position = params.position;
110
+ if (params.type !== undefined)
111
+ updates.type = params.type;
112
+ const list = await updateList(updates);
113
+ return {
114
+ content: [
115
+ {
116
+ type: "text",
117
+ text: JSON.stringify({
118
+ success: true,
119
+ list: {
120
+ id: list.id,
121
+ name: list.name,
122
+ position: list.position,
123
+ },
124
+ }, null, 2),
125
+ },
126
+ ],
127
+ };
128
+ }
129
+ case "delete": {
130
+ if (!params.listId) {
131
+ return {
132
+ content: [
133
+ {
134
+ type: "text",
135
+ text: "Error: listId is required for delete action",
136
+ },
137
+ ],
138
+ isError: true,
139
+ };
140
+ }
141
+ await deleteList({ listId: params.listId });
142
+ return {
143
+ content: [
144
+ {
145
+ type: "text",
146
+ text: JSON.stringify({
147
+ success: true,
148
+ message: `List ${params.listId} deleted`,
149
+ }, null, 2),
150
+ },
151
+ ],
152
+ };
153
+ }
154
+ default:
155
+ return {
156
+ content: [
157
+ {
158
+ type: "text",
159
+ text: `Error: Unknown action '${params.action}'`,
160
+ },
161
+ ],
162
+ isError: true,
163
+ };
164
+ }
165
+ }
166
+ catch (error) {
167
+ if (error instanceof PlankaError) {
168
+ return {
169
+ content: [{ type: "text", text: `Error: ${error.message}` }],
170
+ isError: true,
171
+ };
172
+ }
173
+ throw error;
174
+ }
175
+ },
176
+ };
177
+ export const listTools = [manageListsTool];
178
+ //# sourceMappingURL=lists.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/tools/lists.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,UAAU,EACV,UAAU,EACV,UAAU,GACX,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,6CAA6C;IAC1D,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC;gBACpC,WAAW,EAAE,mBAAmB;aACjC;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QA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tool: planka_get_structure
3
+ * Get the full project/board/list hierarchy.
4
+ */
5
+ export declare const getStructureTool: {
6
+ name: string;
7
+ description: string;
8
+ inputSchema: {
9
+ type: "object";
10
+ properties: {
11
+ projectId: {
12
+ type: string;
13
+ description: string;
14
+ };
15
+ };
16
+ };
17
+ handler: (params: {
18
+ projectId?: string;
19
+ }) => Promise<{
20
+ content: {
21
+ type: "text";
22
+ text: string;
23
+ }[];
24
+ }>;
25
+ };
26
+ /**
27
+ * Tool: planka_get_board
28
+ * Get a board with all its lists, cards, and labels.
29
+ */
30
+ export declare const getBoardTool: {
31
+ name: string;
32
+ description: string;
33
+ inputSchema: {
34
+ type: "object";
35
+ properties: {
36
+ boardId: {
37
+ type: string;
38
+ description: string;
39
+ };
40
+ includeTaskCounts: {
41
+ type: string;
42
+ description: string;
43
+ default: boolean;
44
+ };
45
+ };
46
+ required: string[];
47
+ };
48
+ handler: (params: {
49
+ boardId: string;
50
+ includeTaskCounts?: boolean;
51
+ }) => Promise<{
52
+ content: {
53
+ type: "text";
54
+ text: string;
55
+ }[];
56
+ }>;
57
+ };
58
+ export declare const navigationTools: ({
59
+ name: string;
60
+ description: string;
61
+ inputSchema: {
62
+ type: "object";
63
+ properties: {
64
+ projectId: {
65
+ type: string;
66
+ description: string;
67
+ };
68
+ };
69
+ };
70
+ handler: (params: {
71
+ projectId?: string;
72
+ }) => Promise<{
73
+ content: {
74
+ type: "text";
75
+ text: string;
76
+ }[];
77
+ }>;
78
+ } | {
79
+ name: string;
80
+ description: string;
81
+ inputSchema: {
82
+ type: "object";
83
+ properties: {
84
+ boardId: {
85
+ type: string;
86
+ description: string;
87
+ };
88
+ includeTaskCounts: {
89
+ type: string;
90
+ description: string;
91
+ default: boolean;
92
+ };
93
+ };
94
+ required: string[];
95
+ };
96
+ handler: (params: {
97
+ boardId: string;
98
+ includeTaskCounts?: boolean;
99
+ }) => Promise<{
100
+ content: {
101
+ type: "text";
102
+ text: string;
103
+ }[];
104
+ }>;
105
+ })[];
106
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;sBAaH;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;CA8B/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;sBAmBC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAE;;;;;;CAyFzE,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;sBAlJF;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;sBAuDtB;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;KAAE;;;;;;IA2FX,CAAC"}
@@ -0,0 +1,151 @@
1
+ /**
2
+ * Navigation tools for PLANKA MCP server.
3
+ */
4
+ import { getStructure } from "../operations/projects.js";
5
+ import { getBoardWithTaskCounts } from "../operations/boards.js";
6
+ /**
7
+ * Tool: planka_get_structure
8
+ * Get the full project/board/list hierarchy.
9
+ */
10
+ export const getStructureTool = {
11
+ name: "planka_get_structure",
12
+ description: "Get the full project/board/list structure. Use this to understand what projects and boards exist before working with cards.",
13
+ inputSchema: {
14
+ type: "object",
15
+ properties: {
16
+ projectId: {
17
+ type: "string",
18
+ description: "Optional: Get structure for a specific project only",
19
+ },
20
+ },
21
+ },
22
+ handler: async (params) => {
23
+ const structure = await getStructure({ projectId: params.projectId });
24
+ // Format for readability
25
+ const formatted = structure.map((project) => ({
26
+ project: {
27
+ id: project.project.id,
28
+ name: project.project.name,
29
+ },
30
+ boards: project.boards.map((b) => ({
31
+ id: b.board.id,
32
+ name: b.board.name,
33
+ lists: b.lists
34
+ .filter((l) => l.name !== null) // Filter out archive/trash
35
+ .map((l) => ({
36
+ id: l.id,
37
+ name: l.name,
38
+ })),
39
+ })),
40
+ }));
41
+ return {
42
+ content: [
43
+ {
44
+ type: "text",
45
+ text: JSON.stringify(formatted, null, 2),
46
+ },
47
+ ],
48
+ };
49
+ },
50
+ };
51
+ /**
52
+ * Tool: planka_get_board
53
+ * Get a board with all its lists, cards, and labels.
54
+ */
55
+ export const getBoardTool = {
56
+ name: "planka_get_board",
57
+ description: "Get a board with all its lists, cards, and labels. Use this to see everything on a board.",
58
+ inputSchema: {
59
+ type: "object",
60
+ properties: {
61
+ boardId: {
62
+ type: "string",
63
+ description: "The board ID",
64
+ },
65
+ includeTaskCounts: {
66
+ type: "boolean",
67
+ description: "Include task completion counts for each card",
68
+ default: true,
69
+ },
70
+ },
71
+ required: ["boardId"],
72
+ },
73
+ handler: async (params) => {
74
+ const details = await getBoardWithTaskCounts({ boardId: params.boardId });
75
+ // Group cards by list for readability
76
+ const cardsByList = new Map();
77
+ for (const card of details.cards) {
78
+ const listCards = cardsByList.get(card.listId) || [];
79
+ listCards.push(card);
80
+ cardsByList.set(card.listId, listCards);
81
+ }
82
+ // Build label lookup
83
+ const labelById = new Map(details.labels.map((l) => [l.id, l]));
84
+ // Build card-label lookup
85
+ const labelsByCard = new Map();
86
+ for (const cl of details.cardLabels) {
87
+ const labels = labelsByCard.get(cl.cardId) || [];
88
+ const label = labelById.get(cl.labelId);
89
+ if (label) {
90
+ labels.push(label.name || label.color);
91
+ }
92
+ labelsByCard.set(cl.cardId, labels);
93
+ }
94
+ const formatted = {
95
+ board: {
96
+ id: details.board.id,
97
+ name: details.board.name,
98
+ },
99
+ labels: details.labels.map((l) => ({
100
+ id: l.id,
101
+ name: l.name,
102
+ color: l.color,
103
+ })),
104
+ lists: details.lists
105
+ .filter((l) => l.name !== null) // Filter archive/trash
106
+ .map((list) => {
107
+ const listCards = (cardsByList.get(list.id) || []).sort((a, b) => a.position - b.position);
108
+ return {
109
+ id: list.id,
110
+ name: list.name,
111
+ cards: listCards.map((card) => {
112
+ const cardData = {
113
+ id: card.id,
114
+ name: card.name,
115
+ };
116
+ if (card.description) {
117
+ cardData.description =
118
+ card.description.length > 100
119
+ ? card.description.substring(0, 100) + "..."
120
+ : card.description;
121
+ }
122
+ if (card.dueDate) {
123
+ cardData.dueDate = card.dueDate;
124
+ }
125
+ if (card.isCompleted) {
126
+ cardData.isCompleted = card.isCompleted;
127
+ }
128
+ const cardLabels = labelsByCard.get(card.id);
129
+ if (cardLabels && cardLabels.length > 0) {
130
+ cardData.labels = cardLabels;
131
+ }
132
+ if (params.includeTaskCounts !== false && card.taskCount > 0) {
133
+ cardData.tasks = `${card.completedTaskCount}/${card.taskCount}`;
134
+ }
135
+ return cardData;
136
+ }),
137
+ };
138
+ }),
139
+ };
140
+ return {
141
+ content: [
142
+ {
143
+ type: "text",
144
+ text: JSON.stringify(formatted, null, 2),
145
+ },
146
+ ],
147
+ };
148
+ },
149
+ };
150
+ export const navigationTools = [getStructureTool, getBoardTool];
151
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/tools/navigation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EACT,6HAA6H;IAC/H,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qDAAqD;aACnE;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,MAA8B,EAAE,EAAE;QAChD,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,EAAE,SAAS,EAAE,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