@naumu/mcp 0.6.1 → 0.6.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.
Files changed (178) hide show
  1. package/dist/index.js +2314 -49
  2. package/package.json +6 -4
  3. package/dist/client.d.ts +0 -15
  4. package/dist/client.js +0 -82
  5. package/dist/client.js.map +0 -1
  6. package/dist/errors.d.ts +0 -35
  7. package/dist/errors.js +0 -52
  8. package/dist/errors.js.map +0 -1
  9. package/dist/index.d.ts +0 -2
  10. package/dist/index.js.map +0 -1
  11. package/dist/tools/add-attribute.d.ts +0 -3
  12. package/dist/tools/add-attribute.js +0 -58
  13. package/dist/tools/add-attribute.js.map +0 -1
  14. package/dist/tools/add-connection.d.ts +0 -3
  15. package/dist/tools/add-connection.js +0 -46
  16. package/dist/tools/add-connection.js.map +0 -1
  17. package/dist/tools/add-edge.d.ts +0 -3
  18. package/dist/tools/add-edge.js +0 -33
  19. package/dist/tools/add-edge.js.map +0 -1
  20. package/dist/tools/add-node-type.d.ts +0 -3
  21. package/dist/tools/add-node-type.js +0 -72
  22. package/dist/tools/add-node-type.js.map +0 -1
  23. package/dist/tools/add-node.d.ts +0 -3
  24. package/dist/tools/add-node.js +0 -36
  25. package/dist/tools/add-node.js.map +0 -1
  26. package/dist/tools/add-reaction.d.ts +0 -3
  27. package/dist/tools/add-reaction.js +0 -34
  28. package/dist/tools/add-reaction.js.map +0 -1
  29. package/dist/tools/ask-naumu.d.ts +0 -3
  30. package/dist/tools/ask-naumu.js +0 -44
  31. package/dist/tools/ask-naumu.js.map +0 -1
  32. package/dist/tools/ask.d.ts +0 -3
  33. package/dist/tools/ask.js +0 -37
  34. package/dist/tools/ask.js.map +0 -1
  35. package/dist/tools/batch-reparent.d.ts +0 -3
  36. package/dist/tools/batch-reparent.js +0 -31
  37. package/dist/tools/batch-reparent.js.map +0 -1
  38. package/dist/tools/canvas-add-element.d.ts +0 -3
  39. package/dist/tools/canvas-add-element.js +0 -46
  40. package/dist/tools/canvas-add-element.js.map +0 -1
  41. package/dist/tools/canvas-remove-element.d.ts +0 -3
  42. package/dist/tools/canvas-remove-element.js +0 -17
  43. package/dist/tools/canvas-remove-element.js.map +0 -1
  44. package/dist/tools/canvas-update-element.d.ts +0 -3
  45. package/dist/tools/canvas-update-element.js +0 -20
  46. package/dist/tools/canvas-update-element.js.map +0 -1
  47. package/dist/tools/create-canvas.d.ts +0 -3
  48. package/dist/tools/create-canvas.js +0 -17
  49. package/dist/tools/create-canvas.js.map +0 -1
  50. package/dist/tools/create-graph.d.ts +0 -3
  51. package/dist/tools/create-graph.js +0 -19
  52. package/dist/tools/create-graph.js.map +0 -1
  53. package/dist/tools/create-note.d.ts +0 -3
  54. package/dist/tools/create-note.js +0 -17
  55. package/dist/tools/create-note.js.map +0 -1
  56. package/dist/tools/create-thread.d.ts +0 -3
  57. package/dist/tools/create-thread.js +0 -63
  58. package/dist/tools/create-thread.js.map +0 -1
  59. package/dist/tools/filter.d.ts +0 -3
  60. package/dist/tools/filter.js +0 -54
  61. package/dist/tools/filter.js.map +0 -1
  62. package/dist/tools/get-ai-thread.d.ts +0 -3
  63. package/dist/tools/get-ai-thread.js +0 -18
  64. package/dist/tools/get-ai-thread.js.map +0 -1
  65. package/dist/tools/get-canvas-elements.d.ts +0 -3
  66. package/dist/tools/get-canvas-elements.js +0 -16
  67. package/dist/tools/get-canvas-elements.js.map +0 -1
  68. package/dist/tools/get-canvas-image.d.ts +0 -3
  69. package/dist/tools/get-canvas-image.js +0 -77
  70. package/dist/tools/get-canvas-image.js.map +0 -1
  71. package/dist/tools/get-node.d.ts +0 -3
  72. package/dist/tools/get-node.js +0 -17
  73. package/dist/tools/get-node.js.map +0 -1
  74. package/dist/tools/get-schema.d.ts +0 -3
  75. package/dist/tools/get-schema.js +0 -67
  76. package/dist/tools/get-schema.js.map +0 -1
  77. package/dist/tools/get-thread.d.ts +0 -3
  78. package/dist/tools/get-thread.js +0 -25
  79. package/dist/tools/get-thread.js.map +0 -1
  80. package/dist/tools/get-view.d.ts +0 -3
  81. package/dist/tools/get-view.js +0 -17
  82. package/dist/tools/get-view.js.map +0 -1
  83. package/dist/tools/index.d.ts +0 -16
  84. package/dist/tools/index.js +0 -155
  85. package/dist/tools/index.js.map +0 -1
  86. package/dist/tools/list-canvases.d.ts +0 -3
  87. package/dist/tools/list-canvases.js +0 -16
  88. package/dist/tools/list-canvases.js.map +0 -1
  89. package/dist/tools/list-dense-nodes.d.ts +0 -3
  90. package/dist/tools/list-dense-nodes.js +0 -29
  91. package/dist/tools/list-dense-nodes.js.map +0 -1
  92. package/dist/tools/list-graphs.d.ts +0 -3
  93. package/dist/tools/list-graphs.js +0 -14
  94. package/dist/tools/list-graphs.js.map +0 -1
  95. package/dist/tools/list-node-connections.d.ts +0 -3
  96. package/dist/tools/list-node-connections.js +0 -32
  97. package/dist/tools/list-node-connections.js.map +0 -1
  98. package/dist/tools/list-schema-violations.d.ts +0 -3
  99. package/dist/tools/list-schema-violations.js +0 -16
  100. package/dist/tools/list-schema-violations.js.map +0 -1
  101. package/dist/tools/list-threads.d.ts +0 -3
  102. package/dist/tools/list-threads.js +0 -56
  103. package/dist/tools/list-threads.js.map +0 -1
  104. package/dist/tools/list-view-nodes.d.ts +0 -3
  105. package/dist/tools/list-view-nodes.js +0 -29
  106. package/dist/tools/list-view-nodes.js.map +0 -1
  107. package/dist/tools/naumu-typing.d.ts +0 -3
  108. package/dist/tools/naumu-typing.js +0 -30
  109. package/dist/tools/naumu-typing.js.map +0 -1
  110. package/dist/tools/note-append.d.ts +0 -3
  111. package/dist/tools/note-append.js +0 -17
  112. package/dist/tools/note-append.js.map +0 -1
  113. package/dist/tools/note-delete-section.d.ts +0 -3
  114. package/dist/tools/note-delete-section.js +0 -22
  115. package/dist/tools/note-delete-section.js.map +0 -1
  116. package/dist/tools/note-find-replace.d.ts +0 -3
  117. package/dist/tools/note-find-replace.js +0 -26
  118. package/dist/tools/note-find-replace.js.map +0 -1
  119. package/dist/tools/note-insert.d.ts +0 -3
  120. package/dist/tools/note-insert.js +0 -24
  121. package/dist/tools/note-insert.js.map +0 -1
  122. package/dist/tools/note-read.d.ts +0 -3
  123. package/dist/tools/note-read.js +0 -16
  124. package/dist/tools/note-read.js.map +0 -1
  125. package/dist/tools/note-replace-section.d.ts +0 -3
  126. package/dist/tools/note-replace-section.js +0 -26
  127. package/dist/tools/note-replace-section.js.map +0 -1
  128. package/dist/tools/note-replace.d.ts +0 -3
  129. package/dist/tools/note-replace.js +0 -17
  130. package/dist/tools/note-replace.js.map +0 -1
  131. package/dist/tools/post-message.d.ts +0 -3
  132. package/dist/tools/post-message.js +0 -45
  133. package/dist/tools/post-message.js.map +0 -1
  134. package/dist/tools/react-to-message.d.ts +0 -3
  135. package/dist/tools/react-to-message.js +0 -34
  136. package/dist/tools/react-to-message.js.map +0 -1
  137. package/dist/tools/read-thread.d.ts +0 -3
  138. package/dist/tools/read-thread.js +0 -43
  139. package/dist/tools/read-thread.js.map +0 -1
  140. package/dist/tools/remove-edge.d.ts +0 -3
  141. package/dist/tools/remove-edge.js +0 -25
  142. package/dist/tools/remove-edge.js.map +0 -1
  143. package/dist/tools/remove-edges-bulk.d.ts +0 -3
  144. package/dist/tools/remove-edges-bulk.js +0 -26
  145. package/dist/tools/remove-edges-bulk.js.map +0 -1
  146. package/dist/tools/remove-node.d.ts +0 -3
  147. package/dist/tools/remove-node.js +0 -17
  148. package/dist/tools/remove-node.js.map +0 -1
  149. package/dist/tools/remove-reaction.d.ts +0 -3
  150. package/dist/tools/remove-reaction.js +0 -34
  151. package/dist/tools/remove-reaction.js.map +0 -1
  152. package/dist/tools/reparent.d.ts +0 -3
  153. package/dist/tools/reparent.js +0 -21
  154. package/dist/tools/reparent.js.map +0 -1
  155. package/dist/tools/request-attachment-upload.d.ts +0 -3
  156. package/dist/tools/request-attachment-upload.js +0 -59
  157. package/dist/tools/request-attachment-upload.js.map +0 -1
  158. package/dist/tools/search.d.ts +0 -3
  159. package/dist/tools/search.js +0 -34
  160. package/dist/tools/search.js.map +0 -1
  161. package/dist/tools/semantic-search.d.ts +0 -3
  162. package/dist/tools/semantic-search.js +0 -34
  163. package/dist/tools/semantic-search.js.map +0 -1
  164. package/dist/tools/text-search.d.ts +0 -3
  165. package/dist/tools/text-search.js +0 -18
  166. package/dist/tools/text-search.js.map +0 -1
  167. package/dist/tools/traverse.d.ts +0 -3
  168. package/dist/tools/traverse.js +0 -19
  169. package/dist/tools/traverse.js.map +0 -1
  170. package/dist/tools/update-node.d.ts +0 -30
  171. package/dist/tools/update-node.js +0 -152
  172. package/dist/tools/update-node.js.map +0 -1
  173. package/dist/tools/update-schema.d.ts +0 -3
  174. package/dist/tools/update-schema.js +0 -63
  175. package/dist/tools/update-schema.js.map +0 -1
  176. package/dist/tools/whoami.d.ts +0 -3
  177. package/dist/tools/whoami.js +0 -31
  178. package/dist/tools/whoami.js.map +0 -1
@@ -1,44 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerAskNaumu(server, client) {
3
- server.registerTool('naumu_ask_naumu', {
4
- title: 'Ask Naumu',
5
- description: 'Ask the system @Naumu Identity (the canonical graph-writer/curator) a question about your graph. Use for questions where direct graph reads would be inefficient — Naumu has full read access and synthesizes answers. Limited to 5 calls per hour per Identity. Returns { answer, sources, confidence, durationMs }.',
6
- inputSchema: z.object({
7
- graphId: z.string().describe('The graph ID to ask about.'),
8
- question: z
9
- .string()
10
- .max(4000)
11
- .describe('The question to ask Naumu. Max 4000 characters.'),
12
- }),
13
- }, async ({ graphId, question }) => {
14
- try {
15
- const identityId = process.env.NAUMU_IDENTITY_ID;
16
- if (!identityId) {
17
- return {
18
- content: [
19
- {
20
- type: 'text',
21
- text: 'Error: NAUMU_IDENTITY_ID env var is required for ask_naumu — re-run the pairing setup.',
22
- },
23
- ],
24
- isError: true,
25
- };
26
- }
27
- const data = await client.post(`/api/identities/${identityId}/ask`, {
28
- graphId,
29
- question,
30
- });
31
- return {
32
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
33
- };
34
- }
35
- catch (err) {
36
- const message = err instanceof Error ? err.message : String(err);
37
- return {
38
- content: [{ type: 'text', text: `Error: ${message}` }],
39
- isError: true,
40
- };
41
- }
42
- });
43
- }
44
- //# sourceMappingURL=ask-naumu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ask-naumu.js","sourceRoot":"","sources":["../../src/tools/ask-naumu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,MAAmB;IACtE,MAAM,CAAC,YAAY,CAClB,iBAAiB,EACjB;QACC,KAAK,EAAE,WAAW;QAClB,WAAW,EACV,uTAAuT;QACxT,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;YAC1D,QAAQ,EAAE,CAAC;iBACT,MAAM,EAAE;iBACR,GAAG,CAAC,IAAI,CAAC;iBACT,QAAQ,CAAC,iDAAiD,CAAC;SAC7D,CAAC;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC/B,IAAI,CAAC;YACJ,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;YACjD,IAAI,CAAC,UAAU,EAAE,CAAC;gBACjB,OAAO;oBACN,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,wFAAwF;yBAC9F;qBACD;oBACD,OAAO,EAAE,IAAI;iBACb,CAAC;YACH,CAAC;YAED,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,mBAAmB,UAAU,MAAM,EAAE;gBACnE,OAAO;gBACP,QAAQ;aACR,CAAC,CAAC;YAEH,OAAO;gBACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACzE,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO;gBACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC;gBAC/D,OAAO,EAAE,IAAI;aACb,CAAC;QACH,CAAC;IACF,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerAsk(server: McpServer, client: NaumuClient): void;
package/dist/tools/ask.js DELETED
@@ -1,37 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerAsk(server, client) {
3
- server.registerTool('naumu_ask', {
4
- title: 'Ask AI',
5
- description: 'Send a message to the Naumu AI agent. Use for adding knowledge, making changes, asking questions, or reporting status updates. Always returns immediately with a threadId — the AI processes the request in the background. Depending on complexity, the agent may take anywhere from a few seconds to a few minutes to finish.\n\n' +
6
- '**For reports and status updates** (e.g. "mark task X as done", "record a deployment"): fire and forget — no need to check the response.\n\n' +
7
- '**For questions that need an answer**: after calling this tool, poll with `naumu_get_ai_thread` using the returned threadId until the AI response is ready.',
8
- inputSchema: z.object({
9
- graphId: z.string().describe('The graph ID to query against'),
10
- question: z.string().describe('Your message to the Naumu AI agent'),
11
- threadId: z
12
- .string()
13
- .optional()
14
- .describe('Thread ID for follow-up messages (omit for new conversation)'),
15
- }),
16
- }, async ({ graphId, question, threadId }) => {
17
- // Create a new thread if none provided
18
- if (!threadId) {
19
- const thread = (await client.post('/api/threads', { graphId }));
20
- threadId = thread.id;
21
- }
22
- // Post the message — returns immediately, AI processes in background
23
- await client.post(`/api/threads/${threadId}/messages`, {
24
- content: question,
25
- async: true,
26
- });
27
- return {
28
- content: [
29
- {
30
- type: 'text',
31
- text: JSON.stringify({ threadId, status: 'processing' }, null, 2),
32
- },
33
- ],
34
- };
35
- });
36
- }
37
- //# sourceMappingURL=ask.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ask.js","sourceRoot":"","sources":["../../src/tools/ask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,WAAW,CAAC,MAAiB,EAAE,MAAmB;IACjE,MAAM,CAAC,YAAY,CAClB,WAAW,EACX;QACC,KAAK,EAAE,QAAQ;QACf,WAAW,EACV,qUAAqU;YACrU,8IAA8I;YAC9I,6JAA6J;QAC9J,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;YAC7D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;YACnE,QAAQ,EAAE,CAAC;iBACT,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,8DAA8D,CAAC;SAC1E,CAAC;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE;QACzC,uCAAuC;QACvC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACf,MAAM,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,CAAC,CAAmB,CAAC;YAClF,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC;QACtB,CAAC;QAED,qEAAqE;QACrE,MAAM,MAAM,CAAC,IAAI,CAAC,gBAAgB,QAAQ,WAAW,EAAE;YACtD,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,IAAI;SACX,CAAC,CAAC;QAEH,OAAO;YACN,OAAO,EAAE;gBACR;oBACC,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBACjE;aACD;SACD,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerBatchReparent(server: McpServer, client: NaumuClient): void;
@@ -1,31 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerBatchReparent(server, client) {
3
- server.registerTool('naumu_batch_reparent', {
4
- title: 'Batch Reparent Nodes',
5
- description: 'Reparent 1–25 nodes onto a shared `newParentId` with the same `newRelation`. Same semantics as `naumu_reparent` per-node: atomic swap of the isParent edge, preserves id/content/attributes/embedding, no re-embedding. Idempotent per node (already-parented nodes return `status: "skipped"`). Per-node response array: `[{nodeId, oldParentId, newParentId, status: "moved" | "skipped" | "error", error?}]`. Used to move a same-typed cluster under a freshly-created mini-hub in /restructure.',
6
- inputSchema: z.object({
7
- graphId: z.string().describe('The graph ID'),
8
- newParentId: z
9
- .string()
10
- .describe('Parent node id every nodeId in the batch will be parented to'),
11
- newRelation: z
12
- .string()
13
- .describe('Parent edge relation label (must be valid per schema for child.type → parent.type)'),
14
- nodeIds: z
15
- .array(z.string())
16
- .min(1)
17
- .max(25)
18
- .describe('1–25 child node ids to reparent under `newParentId`'),
19
- }),
20
- }, async ({ graphId, newParentId, newRelation, nodeIds }) => {
21
- const data = await client.post(`/api/graphs/${graphId}/reparent/bulk`, {
22
- newParentId,
23
- newRelation,
24
- nodeIds,
25
- });
26
- return {
27
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
28
- };
29
- });
30
- }
31
- //# sourceMappingURL=batch-reparent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"batch-reparent.js","sourceRoot":"","sources":["../../src/tools/batch-reparent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,qBAAqB,CAAC,MAAiB,EAAE,MAAmB;IAC3E,MAAM,CAAC,YAAY,CAClB,sBAAsB,EACtB;QACC,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EACV,seAAse;QACve,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;YAC5C,WAAW,EAAE,CAAC;iBACZ,MAAM,EAAE;iBACR,QAAQ,CAAC,8DAA8D,CAAC;YAC1E,WAAW,EAAE,CAAC;iBACZ,MAAM,EAAE;iBACR,QAAQ,CAAC,oFAAoF,CAAC;YAChG,OAAO,EAAE,CAAC;iBACR,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;iBACjB,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,EAAE,CAAC;iBACP,QAAQ,CAAC,qDAAqD,CAAC;SACjE,CAAC;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,OAAO,EAAE,EAAE,EAAE;QACxD,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,eAAe,OAAO,gBAAgB,EAAE;YACtE,WAAW;YACX,WAAW;YACX,OAAO;SACP,CAAC,CAAC;QACH,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerCanvasAddElement(server: McpServer, client: NaumuClient): void;
@@ -1,46 +0,0 @@
1
- import { z } from 'zod';
2
- const ELEMENT_TYPES = [
3
- 'rectangle',
4
- 'ellipse',
5
- 'diamond',
6
- 'text',
7
- 'line',
8
- 'arrow',
9
- 'freehand',
10
- 'image',
11
- 'bookmark-card',
12
- 'entity-embed',
13
- ];
14
- export function registerCanvasAddElement(server, client) {
15
- server.registerTool('naumu_canvas_add_element', {
16
- title: 'Add Canvas Element',
17
- description: 'Add a new element to a canvas. Other participants see your colored cursor at the element\'s center while it lands. The server fills in `id`, `version`, `fractionalIndex`, and `seed` automatically — pass only `type`, position (`x`, `y`), and size (`width`, `height`); other fields are optional and have sensible defaults (stroke #1e1e1e, no fill, opacity 1, etc.). For text elements, set `label` and `fontSize`. Coordinates are canvas-space (the same units the live editor uses).',
18
- inputSchema: z.object({
19
- canvasId: z.string().describe('The canvas ID'),
20
- element: z
21
- .object({
22
- type: z.enum(ELEMENT_TYPES).describe('Element shape'),
23
- x: z.number().describe('Top-left x coordinate in canvas space'),
24
- y: z.number().describe('Top-left y coordinate in canvas space'),
25
- width: z.number().describe('Width in canvas units'),
26
- height: z.number().describe('Height in canvas units'),
27
- strokeColor: z.string().optional().describe('Stroke color (hex). Default #1e1e1e.'),
28
- fillColor: z.string().optional().describe('Fill color (hex) or "transparent". Default transparent.'),
29
- strokeWidth: z.number().optional().describe('Stroke width. Default 2.'),
30
- opacity: z.number().min(0).max(1).optional().describe('0..1, default 1'),
31
- roughness: z.number().min(0).max(2).optional().describe('Hand-drawn roughness 0..2. Default 1.'),
32
- label: z.string().optional().describe('Optional label/text content'),
33
- labelFontSize: z.number().optional().describe('Label font size'),
34
- angle: z.number().optional().describe('Rotation in radians. Default 0.'),
35
- })
36
- .passthrough()
37
- .describe('Element fields. Pass only what you set — defaults fill the rest.'),
38
- }),
39
- }, async ({ canvasId, element }) => {
40
- const data = await client.post(`/api/canvases/${canvasId}/elements`, { element });
41
- return {
42
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
43
- };
44
- });
45
- }
46
- //# sourceMappingURL=canvas-add-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canvas-add-element.js","sourceRoot":"","sources":["../../src/tools/canvas-add-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,aAAa,GAAG;IACrB,WAAW;IACX,SAAS;IACT,SAAS;IACT,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;IACV,OAAO;IACP,eAAe;IACf,cAAc;CACL,CAAC;AAEX,MAAM,UAAU,wBAAwB,CAAC,MAAiB,EAAE,MAAmB;IAC9E,MAAM,CAAC,YAAY,CAClB,0BAA0B,EAC1B;QACC,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACV,geAAge;QACje,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;YAC9C,OAAO,EAAE,CAAC;iBACR,MAAM,CAAC;gBACP,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC;gBACrD,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;gBAC/D,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;gBAC/D,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;gBACnD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;gBACrD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;gBACnF,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ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';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerCanvasRemoveElement(server: McpServer, client: NaumuClient): void;
@@ -1,17 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerCanvasRemoveElement(server, client) {
3
- server.registerTool('naumu_canvas_remove_element', {
4
- title: 'Remove Canvas Element',
5
- description: 'Soft-delete a canvas element. The element is tombstoned (isDeleted=true) so concurrent edits don\'t resurrect it. 404 if the element id is not present on this canvas.',
6
- inputSchema: z.object({
7
- canvasId: z.string().describe('The canvas ID'),
8
- elementId: z.string().describe('The element ID to delete'),
9
- }),
10
- }, async ({ canvasId, elementId }) => {
11
- const data = await client.del(`/api/canvases/${canvasId}/elements/${elementId}`);
12
- return {
13
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
14
- };
15
- });
16
- }
17
- //# sourceMappingURL=canvas-remove-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canvas-remove-element.js","sourceRoot":"","sources":["../../src/tools/canvas-remove-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAmB;IACjF,MAAM,CAAC,YAAY,CAClB,6BAA6B,EAC7B;QACC,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACV,wKAAwK;QACzK,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;YAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;SAC1D,CAAC;KACF,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE;QACjC,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,iBAAiB,QAAQ,aAAa,SAAS,EAAE,CAAC,CAAC;QACjF,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerCanvasUpdateElement(server: McpServer, client: NaumuClient): void;
@@ -1,20 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerCanvasUpdateElement(server, client) {
3
- server.registerTool('naumu_canvas_update_element', {
4
- title: 'Update Canvas Element',
5
- description: 'Patch an existing canvas element. Only the fields you pass in `changes` are updated — `id`, `version`, `createdBy`, and `isDeleted` are server-managed and ignored if present. Useful for moving (`x`, `y`), resizing (`width`, `height`), recoloring (`strokeColor`, `fillColor`), or relabeling (`label`).',
6
- inputSchema: z.object({
7
- canvasId: z.string().describe('The canvas ID'),
8
- elementId: z.string().describe('The element ID returned by `naumu_canvas_add_element` or `naumu_get_canvas_elements`'),
9
- changes: z
10
- .record(z.string(), z.unknown())
11
- .describe('Partial element fields to merge in. Server bumps `version` automatically.'),
12
- }),
13
- }, async ({ canvasId, elementId, changes }) => {
14
- const data = await client.patch(`/api/canvases/${canvasId}/elements/${elementId}`, { changes });
15
- return {
16
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
17
- };
18
- });
19
- }
20
- //# sourceMappingURL=canvas-update-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canvas-update-element.js","sourceRoot":"","sources":["../../src/tools/canvas-update-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAmB;IACjF,MAAM,CAAC,YAAY,CAClB,6BAA6B,EAC7B;QACC,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EACV,8SAA8S;QAC/S,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;YAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sFAAsF,CAAC;YACtH,OAAO,EAAE,CAAC;iBACR,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;iBAC/B,QAAQ,CAAC,2EAA2E,CAAC;SACvF,CAAC;KACF,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE;QAC1C,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,KAAK,CAC9B,iBAAiB,QAAQ,aAAa,SAAS,EAAE,EACjD,EAAE,OAAO,EAAE,CACX,CAAC;QACF,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerCreateCanvas(server: McpServer, client: NaumuClient): void;
@@ -1,17 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerCreateCanvas(server, client) {
3
- server.registerTool('naumu_create_canvas', {
4
- title: 'Create Canvas',
5
- description: 'Create a new empty canvas in a graph. Returns the new canvas row including its `id` — pass that id to `naumu_canvas_add_element` to start drawing. Bots can only create canvases in their own graph.',
6
- inputSchema: z.object({
7
- graphId: z.string().describe('The graph ID to create the canvas in'),
8
- title: z.string().optional().describe('Optional title for the canvas'),
9
- }),
10
- }, async ({ graphId, title }) => {
11
- const data = await client.post('/api/canvases', { graphId, title });
12
- return {
13
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
14
- };
15
- });
16
- }
17
- //# sourceMappingURL=create-canvas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-canvas.js","sourceRoot":"","sources":["../../src/tools/create-canvas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAmB;IAC1E,MAAM,CAAC,YAAY,CAClB,qBAAqB,EACrB;QACC,KAAK,EAAE,eAAe;QACtB,WAAW,EACV,sMAAsM;QACvM,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;YACpE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;SACtE,CAAC;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;QAC5B,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACpE,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerCreateGraph(server: McpServer, client: NaumuClient): void;
@@ -1,19 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerCreateGraph(server, client) {
3
- server.registerTool('naumu_create_graph', {
4
- title: 'Create Graph',
5
- description: 'Create a new knowledge graph (space) owned by the authenticated user. Returns `{id, name, slug, role, memberRole, createdAt, onboardingThreadId}` — use the returned `id` as `graphId` for subsequent tool calls. The space starts empty (no schema, no nodes); follow up with `naumu_update_schema` to register types before any `naumu_add_node` calls.',
6
- inputSchema: z.object({
7
- name: z
8
- .string()
9
- .min(1)
10
- .describe('Display name for the new space. A URL slug is generated from this name.'),
11
- }),
12
- }, async ({ name }) => {
13
- const data = await client.post('/api/graphs', { name });
14
- return {
15
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
16
- };
17
- });
18
- }
19
- //# sourceMappingURL=create-graph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-graph.js","sourceRoot":"","sources":["../../src/tools/create-graph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,MAAmB;IACzE,MAAM,CAAC,YAAY,CAClB,oBAAoB,EACpB;QACC,KAAK,EAAE,cAAc;QACrB,WAAW,EACV,2VAA2V;QAC5V,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,IAAI,EAAE,CAAC;iBACL,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,QAAQ,CAAC,yEAAyE,CAAC;SACrF,CAAC;KACF,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;QAClB,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACxD,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerCreateNote(server: McpServer, client: NaumuClient): void;
@@ -1,17 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerCreateNote(server, client) {
3
- server.registerTool('naumu_create_note', {
4
- title: 'Create Note',
5
- description: 'Create a new empty note in a graph. Returns the new note row including its `id` — pass that id to `naumu_note_append` / `naumu_note_replace` to fill in the content. Bots can only create notes in their own graph.',
6
- inputSchema: z.object({
7
- graphId: z.string().describe('The graph ID to create the note in'),
8
- title: z.string().optional().describe('Optional title for the note'),
9
- }),
10
- }, async ({ graphId, title }) => {
11
- const data = await client.post('/api/notes', { graphId, title });
12
- return {
13
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
14
- };
15
- });
16
- }
17
- //# sourceMappingURL=create-note.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-note.js","sourceRoot":"","sources":["../../src/tools/create-note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,MAAmB;IACxE,MAAM,CAAC,YAAY,CAClB,mBAAmB,EACnB;QACC,KAAK,EAAE,aAAa;QACpB,WAAW,EACV,qNAAqN;QACtN,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;YAClE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;SACpE,CAAC;KACF,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE;QAC5B,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;QACjE,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerCreateThread(server: McpServer, client: NaumuClient): void;
@@ -1,63 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerCreateThread(server, client) {
3
- server.registerTool('naumu_create_thread', {
4
- title: 'Create Thread',
5
- description: 'Start a new conversation in your graph. You are auto-attached as a permanent participant; the thread\'s formal creator is your primary owner (the user who registered you), so the thread shows up in their sidebar. Optional `participants` adds humans (by userId) and other bots (by identityId) at creation time. Optional `initialMessage` is posted as your first message — use it to open the conversation. Returns the created thread (including its id) so you can immediately call `naumu_post_message` for follow-ups. Useful for scheduled briefings ("Brief me about X every morning at 9am" — schedule on your side, then call this to deliver into Naumu).',
6
- inputSchema: z.object({
7
- title: z
8
- .string()
9
- .min(1)
10
- .max(200)
11
- .optional()
12
- .describe('Thread title shown in the sidebar. If omitted, Naumu generates a default like "Conversation YYYY-MM-DD".'),
13
- participants: z
14
- .array(z.discriminatedUnion('type', [
15
- z.object({
16
- type: z.literal('user'),
17
- userId: z.string().min(1).describe('User UUID — get these from `naumu_get_thread`/`naumu_read_thread` participant rosters or webhook payloads.'),
18
- }),
19
- z.object({
20
- type: z.literal('identity'),
21
- identityId: z.string().min(1).describe('Identity id (`identity-…` or `id-…`). Other bots in the same graph can be co-attached to multi-bot threads.'),
22
- }),
23
- ]))
24
- .max(32)
25
- .optional()
26
- .describe('Up to 32 humans and/or other bots to attach at creation. Your primary owner is added automatically — you do NOT need to list them here.'),
27
- initialMessage: z
28
- .string()
29
- .min(1)
30
- .max(32_000)
31
- .optional()
32
- .describe('Markdown body for the first message. Authored by you (the bot), so it appears in the thread under your name.'),
33
- visibility: z
34
- .enum(['restricted', 'internal', 'open'])
35
- .optional()
36
- .describe('`restricted` (invite-only, default) hides from non-participants. `internal` is visible to space members. `open` is visible to anyone who can see the space.'),
37
- }),
38
- }, async ({ title, participants, initialMessage, visibility }) => {
39
- try {
40
- const body = {};
41
- if (title !== undefined)
42
- body.title = title;
43
- if (participants !== undefined)
44
- body.participants = participants;
45
- if (initialMessage !== undefined)
46
- body.initialMessage = initialMessage;
47
- if (visibility !== undefined)
48
- body.visibility = visibility;
49
- const data = await client.post('/api/identities/me/threads', body);
50
- return {
51
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
52
- };
53
- }
54
- catch (err) {
55
- const message = err instanceof Error ? err.message : String(err);
56
- return {
57
- content: [{ type: 'text', text: `Error: ${message}` }],
58
- isError: true,
59
- };
60
- }
61
- });
62
- }
63
- //# sourceMappingURL=create-thread.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-thread.js","sourceRoot":"","sources":["../../src/tools/create-thread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAAmB;IAC1E,MAAM,CAAC,YAAY,CAClB,qBAAqB,EACrB;QACC,KAAK,EAAE,eAAe;QACtB,WAAW,EACV,2oBAA2oB;QAC5oB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,KAAK,EAAE,CAAC;iBACN,MAAM,EAAE;iBACR,GAAG,CAAC,CAAC,CAAC;iBACN,GAAG,CAAC,GAAG,CAAC;iBACR,QAAQ,EAAE;iBACV,QAAQ,CAAC,0GAA0G,CAAC;YACtH,YAAY,EAAE,CAAC;iBACb,KAAK,CACL,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;gBAC5B,CAAC,CAAC,MAAM,CAAC;oBACR,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC;oBACvB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,Q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AI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;aACzE,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACjE,OAAO;gBACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,UAAU,OAAO,EAAE,EAAE,CAAC;gBAC/D,OAAO,EAAE,IAAI;aACb,CAAC;QACH,CAAC;IACF,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerFilter(server: McpServer, client: NaumuClient): void;
@@ -1,54 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerFilter(server, client) {
3
- server.registerTool('naumu_filter', {
4
- title: 'Filter Graph Nodes',
5
- description: 'Filter nodes by type and attributes with deterministic, complete results. Use this for structured queries like "all in-progress Tasks" or "Bugs not yet resolved." Unlike search tools, this returns every matching node (up to the limit) — no semantic ranking, no missed results. Results are sorted by sortKey or recency.',
6
- inputSchema: z.object({
7
- graphId: z.string().describe('The graph ID'),
8
- nodeTypes: z
9
- .array(z.string())
10
- .optional()
11
- .describe('Filter to specific node types (e.g. ["Task", "Bug"])'),
12
- includeAttributes: z
13
- .record(z.array(z.string()))
14
- .optional()
15
- .describe('Only include nodes where attribute matches one of the values. Example: {"Status": ["Todo", "In Progress"]}'),
16
- excludeAttributes: z
17
- .record(z.array(z.string()))
18
- .optional()
19
- .describe('Exclude nodes where attribute matches any of the values. Example: {"Status": ["Done", "Wont do"]}'),
20
- sortBy: z
21
- .enum(['sortKey', 'updatedAt', 'label'])
22
- .optional()
23
- .default('sortKey')
24
- .describe('Sort order: "sortKey" (default), "updatedAt" (most recent first), or "label" (alphabetical)'),
25
- limit: z
26
- .number()
27
- .optional()
28
- .default(50)
29
- .describe('Max results to return (default 50, max 200)'),
30
- }),
31
- }, async ({ graphId, nodeTypes, includeAttributes, excludeAttributes, sortBy, limit }) => {
32
- const params = new URLSearchParams();
33
- if (nodeTypes?.length)
34
- params.set('nodeTypes', nodeTypes.join(','));
35
- if (sortBy)
36
- params.set('sortBy', sortBy);
37
- if (limit)
38
- params.set('limit', String(limit));
39
- // Serialize attribute filters: "Status:Todo,In Progress;Priority:High"
40
- if (includeAttributes) {
41
- const parts = Object.entries(includeAttributes).map(([k, v]) => `${k}:${v.join(',')}`);
42
- params.set('includeAttributes', parts.join(';'));
43
- }
44
- if (excludeAttributes) {
45
- const parts = Object.entries(excludeAttributes).map(([k, v]) => `${k}:${v.join(',')}`);
46
- params.set('excludeAttributes', parts.join(';'));
47
- }
48
- const data = await client.get(`/api/graphs/${graphId}/filter?${params.toString()}`);
49
- return {
50
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
51
- };
52
- });
53
- }
54
- //# sourceMappingURL=filter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter.js","sourceRoot":"","sources":["../../src/tools/filter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,cAAc,CAAC,MAAiB,EAAE,MAAmB;IACpE,MAAM,CAAC,YAAY,CAClB,cAAc,EACd;QACC,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EACV,gUAAgU;QACjU,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;YAC5C,SAAS,EAAE,CAAC;iBACV,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;iBACjB,QAAQ,EAAE;iBACV,QAAQ,CAAC,sDAA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AAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACvF,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,iBAAiB,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACvF,MAAM,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAClD,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,eAAe,OAAO,WAAW,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QACpF,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerGetAiThread(server: McpServer, client: NaumuClient): void;
@@ -1,18 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerGetAiThread(server, client) {
3
- server.registerTool('naumu_get_ai_thread', {
4
- title: 'Get AI Thread',
5
- description: 'Retrieve messages from an AI conversation thread. Use to read the AI response after a `naumu_ask` call.\n\n' +
6
- 'The last AI message has a `status` field: `"processing"` means the AI is still working, `"complete"` means the response is ready. ' +
7
- 'If still processing, wait a few seconds and try again.',
8
- inputSchema: z.object({
9
- threadId: z.string().describe('The thread ID returned by naumu_ask'),
10
- }),
11
- }, async ({ threadId }) => {
12
- const data = await client.get(`/api/threads/${threadId}/messages`);
13
- return {
14
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
15
- };
16
- });
17
- }
18
- //# sourceMappingURL=get-ai-thread.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-ai-thread.js","sourceRoot":"","sources":["../../src/tools/get-ai-thread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,MAAmB;IACzE,MAAM,CAAC,YAAY,CAClB,qBAAqB,EACrB;QACC,KAAK,EAAE,eAAe;QACtB,WAAW,EACV,6GAA6G;YAC7G,oIAAoI;YACpI,wDAAwD;QACzD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC;SACpE,CAAC;KACF,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACtB,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,gBAAgB,QAAQ,WAAW,CAAC,CAAC;QACnE,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerGetCanvasElements(server: McpServer, client: NaumuClient): void;
@@ -1,16 +0,0 @@
1
- import { z } from 'zod';
2
- export function registerGetCanvasElements(server, client) {
3
- server.registerTool('naumu_get_canvas_elements', {
4
- title: 'Get Canvas Elements',
5
- description: 'Read the structured JSON contents of a canvas — every shape, text, line, freehand stroke, image, bookmark card, and entity-embed with their positions, colors, and text. Use this when you need to reason about what a user has drawn without needing to see the visual output.',
6
- inputSchema: z.object({
7
- canvasId: z.string().describe('The canvas ID'),
8
- }),
9
- }, async ({ canvasId }) => {
10
- const data = await client.get(`/api/canvases/${encodeURIComponent(canvasId)}/elements`);
11
- return {
12
- content: [{ type: 'text', text: JSON.stringify(data, null, 2) }],
13
- };
14
- });
15
- }
16
- //# sourceMappingURL=get-canvas-elements.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-canvas-elements.js","sourceRoot":"","sources":["../../src/tools/get-canvas-elements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,MAAmB;IAC/E,MAAM,CAAC,YAAY,CAClB,2BAA2B,EAC3B;QACC,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EACV,iRAAiR;QAClR,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;SAC9C,CAAC;KACF,EACD,KAAK,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE;QACtB,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,iBAAiB,kBAAkB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxF,OAAO;YACN,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;SACzE,CAAC;IACH,CAAC,CACD,CAAC;AACH,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { NaumuClient } from '../client.js';
3
- export declare function registerGetCanvasImage(server: McpServer, client: NaumuClient): void;