@naumu/mcp 0.9.0 → 0.10.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 (3) hide show
  1. package/README.md +1 -0
  2. package/dist/index.js +305 -145
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -51,6 +51,7 @@ Add to your Cursor MCP settings:
51
51
  | `naumu_add_edge` | Create a relationship between two nodes |
52
52
  | `naumu_remove_node` | Delete a node and its connections |
53
53
  | `naumu_remove_edge` | Delete a relationship |
54
+ | `naumu_create_topic` | Create a topic (filing destination) in a space; admin-only, name must be a lowercase slug, returns an `id` for `topicIds` params |
54
55
  | `naumu_ask` | Ask @Naumu a question and get a synthesised answer back (answer + sources + confidence + threadId + status); leaves a visible thread in the space |
55
56
  | `naumu_delegate` | Hand @Naumu a task to carry out asynchronously (add knowledge, make changes); returns a `threadId` immediately, then poll with `naumu_read_thread` |
56
57
  | `naumu_read_thread` | Read a thread's messages; each message carries a `status` of `processing` or `complete` |
package/dist/index.js CHANGED
@@ -523,11 +523,11 @@ function registerSearch(server2, client2) {
523
523
  {
524
524
  title: "Search Graph",
525
525
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
526
- description: 'Hybrid search over graph nodes; use for meaning-based lookup when you don\'t know the exact label. Combines exact-token text matching (good for UUIDs, proper nouns, specific labels) with semantic similarity (good for paraphrase and meaning), then fuses both rankings with Reciprocal Rank Fusion. Returns the top matches with a `matchedVia` tag - `both` is the highest-confidence signal, then `semantic`, then `text`. Use `naumu_filter` for structured queries by type and attributes (e.g. "all in-progress Tasks"). Tip: include both synonyms ("authentication login SSO") and exact tokens you remember in the same query - the fusion handles both.',
526
+ description: 'Hybrid search over graph nodes; use for meaning-based lookup when you don\'t know the exact label. Combines text matching, which looks for the whole query as one contiguous substring (good for UUIDs, proper nouns, specific labels), with semantic similarity (good for paraphrase and meaning), then fuses both rankings with Reciprocal Rank Fusion. Returns the top matches with a `matchedVia` tag - `both` is the highest-confidence signal, then `semantic`, then `text`. Use `naumu_filter` for structured queries by type and attributes (e.g. "all in-progress Tasks").',
527
527
  inputSchema: z9.object({
528
528
  graphId: z9.string().describe("The graph ID"),
529
529
  query: z9.string().describe(
530
- 'Search query text. Mix synonyms and exact tokens freely (e.g. "auth login SSO 2fa Twitter handle").'
530
+ "A short contiguous phrase \u2014 an entity name, label, or ID. The text half matches it verbatim as a case-insensitive substring; the semantic half matches meaning."
531
531
  ),
532
532
  limit: z9.number().optional().default(20).describe("Max results to return (default 20, max 200). Adaptive cutoff may return fewer when the top match is weak."),
533
533
  nodeTypes: z9.array(z9.string()).optional().describe('Filter to specific node types (e.g. ["Type A", "Type B"])')
@@ -805,7 +805,7 @@ function registerAddNode(server2, client2) {
805
805
  {
806
806
  title: "Add Nodes (bulk)",
807
807
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
808
- description: 'Create 1-25 nodes in the knowledge graph in a single call; use when you have a vetted, dedup-checked batch ready to insert. Keep batches small and atomic (5-25 nodes) so failures stay contained. Each node MUST include a non-empty `content` describing what it is. Returns one entry per input node with `{id, label, type, status: "created"}` - there is NO server-side dedup, every input becomes a node. Dedup is the caller\'s responsibility: BEFORE calling this tool, run `naumu_search` on each candidate label and skip/route to update if a result has high similarity (\u22650.78) and matching type. Warning: nodes are isolated until you connect them with `naumu_add_edge`. Prefer `naumu_delegate` for general knowledge intake - it discovers and creates connections for you.',
808
+ description: 'Create 1-25 nodes in the knowledge graph in a single call; use when you have a vetted, dedup-checked batch ready to insert. Keep batches small and atomic (5-25 nodes) so failures stay contained. Each node MUST include a non-empty `content` describing what it is. Returns one entry per input node with `{id, label, type, status: "created"}` - there is NO server-side dedup, every input becomes a node. Dedup is the caller\'s responsibility: BEFORE calling this tool, run `naumu_search` on each candidate label and treat a result as the same entity when its `matchedVia` is "semantic" or "both" AND its type matches AND the labels plausibly name the same thing - then reuse/update that node instead of creating one. (The `score` field is a rank-fusion value, not a similarity - do not compare it against a threshold.) Warning: nodes are isolated until you connect them with `naumu_add_edge`. Prefer `naumu_delegate` for general knowledge intake - it discovers and creates connections for you.',
809
809
  inputSchema: z13.object({
810
810
  graphId: z13.string().describe("The graph ID"),
811
811
  nodes: z13.array(NodeInput).min(1).max(25).describe("Batch of 1\u201325 nodes to create. Keep batches small for atomicity.")
@@ -1091,18 +1091,20 @@ function registerPostMessage(server2, client2) {
1091
1091
  idempotentHint: false,
1092
1092
  openWorldHint: false
1093
1093
  },
1094
- description: 'Post a message in a Naumu thread you participate in. Use it to reply to humans (or other bots) in a thread that pinged you. Plain text is accepted by default; for rendered @mentions pass a Tiptap JSON document with mention nodes (`{ type: "mention", attrs: { id, label } }`) and set contentFormat to "tiptap". @mentioning people loops them in (mention notifications, prompts) without invoking @Naumu. For a human, the mention `id` is their User id (from naumu_list_members or naumu_get_thread participantDetails) or their email - both work; for a bot/agent, use its identity id. To attach files call naumu_request_attachment_upload first, PUT the bytes to the returned uploadUrl, then pass the resulting attachmentIds here. The message needs either `content` or `attachmentIds`. Returns the created message JSON. To get a synthesised answer from @Naumu, use naumu_ask.',
1094
+ description: 'Post a message in a Naumu thread you participate in. Use it to reply to humans (or other bots) in a thread that pinged you. Write `content` in markdown (the default format): **bold**, *italic*, `inline code`, fenced code blocks, `- ` bullets, `1. ` ordered lists, and `> ` quotes all render natively; headings and tables are not supported and render as plain text. Mentions are inline pills: `@[Name](id)` mentions a person or bot and `#[label](topic-id)` tags a topic. For a human the mention id is their User id (from naumu_list_members or naumu_get_thread participantDetails) or their email - both work; for a bot/agent use its identity id; `@[Naumu](naumu-ai)` addresses the @Naumu agent (a bare `@naumu` in prose also summons it, so only type it when you mean to). @mentioning people loops them in (mention notifications, prompts) without invoking @Naumu. Set contentFormat to "tiptap" only when you need rich content beyond the markdown subset, passing a Tiptap JSON document with mention nodes (`{ type: "mention", attrs: { id, label } }`). To attach files call naumu_request_attachment_upload first, PUT the bytes to the returned uploadUrl, then pass the resulting attachmentIds here. The message needs either `content` or `attachmentIds`. Returns the created message JSON. To get a synthesised answer from @Naumu, use naumu_ask.',
1095
1095
  inputSchema: z20.object({
1096
1096
  threadId: z20.string().describe("The thread ID to post into. You must be a participant in this thread."),
1097
- content: z20.string().optional().describe('Message body. Plain text by default; pass a Tiptap JSON document only if contentFormat is set to "tiptap". Optional when `attachmentIds` is provided.'),
1098
- contentFormat: z20.enum(["tiptap", "text"]).optional().describe('Format of `content`. Defaults to "text". Use "tiptap" for rendered mentions/embeds, e.g. a doc containing `{ type: "mention", attrs: { id: userIdOrEmailOrIdentityId, label: displayName } }` (a human mention id is their User id or email; a bot mention id is its identity id).'),
1097
+ content: z20.string().optional().describe('Message body. Markdown by default (see the tool description for the supported subset and the `@[Name](id)` mention pill syntax); a Tiptap JSON document when contentFormat is "tiptap". Optional when `attachmentIds` is provided.'),
1098
+ contentFormat: z20.enum(["tiptap", "markdown"]).optional().describe('Format of `content`. Defaults to "markdown" (rendered subset plus `@[Name](id)` / `#[label](topic-id)` mention pills). Use "tiptap" for full rich content, e.g. a doc containing `{ type: "mention", attrs: { id: userIdOrEmailOrIdentityId, label: displayName } }`.'),
1099
1099
  attachmentIds: z20.array(z20.string().min(1)).max(25).optional().describe("Attachment IDs from prior `naumu_request_attachment_upload` calls. Each must be a successfully-uploaded pending attachment in this graph (1-hour TTL). Up to 25 per message.")
1100
1100
  })
1101
1101
  },
1102
1102
  async ({ threadId, content, contentFormat, attachmentIds }) => {
1103
1103
  try {
1104
1104
  const body = {
1105
- contentFormat: contentFormat ?? "text"
1105
+ // 'markdown' is the announced name for the API's 'text' mode;
1106
+ // deployed backends may predate the alias, so translate on the wire.
1107
+ contentFormat: contentFormat === "tiptap" ? "tiptap" : "text"
1106
1108
  };
1107
1109
  if (content !== void 0) body.content = content;
1108
1110
  if (attachmentIds && attachmentIds.length > 0) body.attachmentIds = attachmentIds;
@@ -1285,8 +1287,106 @@ function registerListTopics(server2, client2) {
1285
1287
  );
1286
1288
  }
1287
1289
 
1288
- // ../mcp-core/src/tools/get-thread.ts
1290
+ // ../mcp-core/src/tools/create-topic.ts
1289
1291
  import { z as z25 } from "zod";
1292
+ var TOPIC_NAME_PATTERN = /^[a-z0-9-]+$/;
1293
+ var TOPIC_NAME_MAX_LENGTH = 50;
1294
+ var RESERVED_TOPIC_NAMES = [
1295
+ "all",
1296
+ "everyone",
1297
+ "naumu",
1298
+ "here",
1299
+ "misc",
1300
+ "hidden",
1301
+ "space",
1302
+ "shared-with-you"
1303
+ ];
1304
+ function validateTopicName(name) {
1305
+ const trimmed = name.trim();
1306
+ if (trimmed.length === 0) return "Topic name is required.";
1307
+ if (trimmed.length > TOPIC_NAME_MAX_LENGTH) {
1308
+ return `Topic name must be at most ${TOPIC_NAME_MAX_LENGTH} characters (got ${trimmed.length}).`;
1309
+ }
1310
+ if (!TOPIC_NAME_PATTERN.test(trimmed)) {
1311
+ return `Invalid topic name "${trimmed}". Only lowercase letters, numbers, and "-" are allowed (e.g. "core-team"). Replace spaces with hyphens and drop any other characters.`;
1312
+ }
1313
+ if (RESERVED_TOPIC_NAMES.includes(trimmed.toLowerCase())) {
1314
+ return `Topic name "${trimmed}" is reserved. Reserved names: ${RESERVED_TOPIC_NAMES.join(", ")}.`;
1315
+ }
1316
+ return null;
1317
+ }
1318
+ function registerCreateTopic(server2, client2) {
1319
+ server2.registerTool(
1320
+ "naumu_create_topic",
1321
+ {
1322
+ title: "Create Topic",
1323
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1324
+ description: 'Create a new topic (filing destination) in a space; use when the topic a thread or note should be filed into does not exist yet. Check `naumu_list_topics` first so you reuse an existing topic instead of creating a near-duplicate. Returns the created topic `{id, name, color, visibilityMode, archived, openToWeb, webParticipation, createdAt, createdBy, memberIds, isMember}` - pass the returned `id` to the `topicIds` param of naumu_delegate, naumu_ask or naumu_create_note to file work into it. Name rules (validated before the call): lowercase letters, numbers and "-" only (channel-slug style, e.g. "core-team"), at most 50 characters, and never one of the reserved names all, everyone, naumu, here, misc, hidden, space, shared-with-you. Names are unique per space, case-insensitively. Requires admin rights on the space: editors and bot identities always get a 403, so do not attempt this on behalf of a bot. `visibilityMode` defaults to "open"; the caller is always added as a member, and `openToWeb` cannot be combined with a "closed" topic. Resolve `graphId` via naumu_list_graphs first.',
1325
+ inputSchema: z25.object({
1326
+ graphId: z25.string().describe("The space (graph) id to create the topic in."),
1327
+ name: z25.string().min(1).describe(
1328
+ 'Topic name in channel-slug form: lowercase letters, numbers and "-" only, max 50 chars, not a reserved name. Unique per space (case-insensitive).'
1329
+ ),
1330
+ color: z25.string().optional().describe("Optional named color token for the topic badge. Omit unless the user asked for a specific color."),
1331
+ visibilityMode: z25.enum(["default", "open", "closed"]).optional().describe(
1332
+ 'Who can see and join the topic. "open" (the default) lets any space member join, "default" is the space default, "closed" is invite-only.'
1333
+ ),
1334
+ openToWeb: z25.boolean().optional().describe('Expose the topic publicly on the web. Invalid together with visibilityMode "closed".'),
1335
+ webParticipation: z25.enum(["participate", "view-only"]).optional().describe('What public web visitors may do when openToWeb is true. Defaults to "view-only".'),
1336
+ memberIds: z25.array(z25.string()).optional().describe(
1337
+ "User ids to add as topic members (get them from naumu_list_members). Ids that are not current space members are silently dropped. The caller is always added regardless."
1338
+ )
1339
+ })
1340
+ },
1341
+ async ({ graphId, name, color, visibilityMode, openToWeb, webParticipation, memberIds }) => {
1342
+ const nameError = validateTopicName(name);
1343
+ if (nameError) {
1344
+ return {
1345
+ content: [
1346
+ {
1347
+ type: "text",
1348
+ text: `Topic name validation failed - no topic was created: ${nameError}`
1349
+ }
1350
+ ],
1351
+ isError: true
1352
+ };
1353
+ }
1354
+ if (openToWeb === true && visibilityMode === "closed") {
1355
+ return {
1356
+ content: [
1357
+ {
1358
+ type: "text",
1359
+ text: 'Topic validation failed - no topic was created: public web access is only available on open or default topics, so openToWeb cannot be true when visibilityMode is "closed".'
1360
+ }
1361
+ ],
1362
+ isError: true
1363
+ };
1364
+ }
1365
+ try {
1366
+ const data = await client2.post(`/api/graphs/${graphId}/topics`, {
1367
+ name: name.trim(),
1368
+ color,
1369
+ visibilityMode,
1370
+ openToWeb,
1371
+ webParticipation,
1372
+ memberIds
1373
+ });
1374
+ return {
1375
+ content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
1376
+ };
1377
+ } catch (err) {
1378
+ const message = err instanceof Error ? err.message : String(err);
1379
+ return {
1380
+ content: [{ type: "text", text: `Error: ${message}` }],
1381
+ isError: true
1382
+ };
1383
+ }
1384
+ }
1385
+ );
1386
+ }
1387
+
1388
+ // ../mcp-core/src/tools/get-thread.ts
1389
+ import { z as z26 } from "zod";
1290
1390
  function sanitizeThreadParticipants2(thread) {
1291
1391
  if (!thread || typeof thread !== "object" || !("participantEmails" in thread)) {
1292
1392
  return thread;
@@ -1301,8 +1401,8 @@ function registerGetThread(server2, client2) {
1301
1401
  title: "Get Thread",
1302
1402
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
1303
1403
  description: "Fetch a single thread, including the human participant roster (`participantDetails` \u2014 userId, name, image) and bot roster (`identityParticipants` \u2014 id, name, isSystem). Use this when `naumu_list_threads` surfaced a candidate and you want to know exactly who is in it before posting. Pair with `naumu_read_thread` for message history.",
1304
- inputSchema: z25.object({
1305
- threadId: z25.string().describe("The thread ID to fetch.")
1404
+ inputSchema: z26.object({
1405
+ threadId: z26.string().describe("The thread ID to fetch.")
1306
1406
  })
1307
1407
  },
1308
1408
  async ({ threadId }) => {
@@ -1324,7 +1424,7 @@ function registerGetThread(server2, client2) {
1324
1424
  }
1325
1425
 
1326
1426
  // ../mcp-core/src/tools/create-thread.ts
1327
- import { z as z26 } from "zod";
1427
+ import { z as z27 } from "zod";
1328
1428
  function registerCreateThread(server2, client2) {
1329
1429
  server2.registerTool(
1330
1430
  "naumu_create_thread",
@@ -1339,23 +1439,23 @@ function registerCreateThread(server2, client2) {
1339
1439
  openWorldHint: false
1340
1440
  },
1341
1441
  description: "Start a new conversation in a space. You are auto-attached as a participant, and the thread's formal creator is your primary owner (the user who registered you), so it shows in their sidebar. Optional `participants` adds humans (by userId) and other bots (by identityId) at creation. Optional `initialMessage` opens the conversation as your first message. Optional `topicIds` files the new thread into one or more topics (see naumu_list_topics for ids): it becomes visible to those topics' members from birth instead of staying a private thread between you and your owner. Filing is creation-only and only ever widens - it never removes the thread from a topic later. Tagging people loops them in without invoking @Naumu; only an explicit @Naumu mention, or naumu_ask, brings the agent in. Returns the created thread (including its id) so you can follow up with naumu_post_message.",
1342
- inputSchema: z26.object({
1343
- title: z26.string().min(1).max(200).optional().describe('Thread title shown in the sidebar. If omitted, Naumu generates a default like "Conversation YYYY-MM-DD".'),
1344
- participants: z26.array(
1345
- z26.discriminatedUnion("type", [
1346
- z26.object({
1347
- type: z26.literal("user"),
1348
- userId: z26.string().min(1).describe("User UUID \u2014 get these from `naumu_get_thread`/`naumu_read_thread` participant rosters or webhook payloads.")
1442
+ inputSchema: z27.object({
1443
+ title: z27.string().min(1).max(200).optional().describe('Thread title shown in the sidebar. If omitted, Naumu generates a default like "Conversation YYYY-MM-DD".'),
1444
+ participants: z27.array(
1445
+ z27.discriminatedUnion("type", [
1446
+ z27.object({
1447
+ type: z27.literal("user"),
1448
+ userId: z27.string().min(1).describe("User UUID \u2014 get these from `naumu_get_thread`/`naumu_read_thread` participant rosters or webhook payloads.")
1349
1449
  }),
1350
- z26.object({
1351
- type: z26.literal("identity"),
1352
- identityId: z26.string().min(1).describe("Identity id (`identity-\u2026` or `id-\u2026`). Other bots in the same graph can be co-attached to multi-bot threads.")
1450
+ z27.object({
1451
+ type: z27.literal("identity"),
1452
+ identityId: z27.string().min(1).describe("Identity id (`identity-\u2026` or `id-\u2026`). Other bots in the same graph can be co-attached to multi-bot threads.")
1353
1453
  })
1354
1454
  ])
1355
1455
  ).max(32).optional().describe("Up to 32 humans and/or other bots to attach at creation. Your primary owner is added automatically \u2014 you do NOT need to list them here."),
1356
- initialMessage: z26.string().min(1).max(32e3).optional().describe("Markdown body for the first message. Authored by you (the bot), so it appears in the thread under your name."),
1357
- visibility: z26.enum(["restricted", "internal", "open"]).optional().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."),
1358
- topicIds: z26.array(z26.string()).max(8).optional().describe(
1456
+ initialMessage: z27.string().min(1).max(32e3).optional().describe("Markdown body for the first message. Authored by you (the bot), so it appears in the thread under your name."),
1457
+ visibility: z27.enum(["restricted", "internal", "open"]).optional().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."),
1458
+ topicIds: z27.array(z27.string()).max(8).optional().describe(
1359
1459
  "Topic ids (from naumu_list_topics) to file the NEW thread into, making it visible to those topics' members from birth. Creation-only and only ever widens - it never removes the thread from a topic later. Omit to keep the default private thread between you and your owner."
1360
1460
  )
1361
1461
  })
@@ -1384,32 +1484,53 @@ function registerCreateThread(server2, client2) {
1384
1484
  }
1385
1485
 
1386
1486
  // ../mcp-core/src/tools/request-attachment-upload.ts
1387
- import { z as z27 } from "zod";
1487
+ import { z as z28 } from "zod";
1388
1488
  function registerRequestAttachmentUpload(server2, client2) {
1389
1489
  server2.registerTool(
1390
1490
  "naumu_request_attachment_upload",
1391
1491
  {
1392
1492
  title: "Request Attachment Upload",
1393
1493
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1394
- description: 'Request a presigned S3 upload URL to attach a file to a message; use when you want to deliver generated content as a file (a markdown report, a PDF, an image, an audio recording, a video). Same flow Naumu users use for file uploads: get a signed URL, PUT the bytes to it directly, then call `naumu_post_message` with the returned `attachmentId` in `attachmentIds`. Per-MIME size caps apply (typically 50MB umbrella, 10MB for agent-readable types).\n\nReturns `{ attachmentId, uploadUrl, method, requiredHeaders, expiresAt }`. Use these EXACTLY:\n\u2022 `method` is "PUT".\n\u2022 Send every header in `requiredHeaders` (Content-Type matters for S3 signature validation).\n\u2022 Do NOT add an Authorization header - the URL itself is the auth.\n\u2022 Do NOT log `uploadUrl` - it is a bearer capability for the duration of the TTL.\n\u2022 `expiresAt` is a Unix-ms timestamp; the pending attachment vanishes at that moment whether or not you uploaded. Call `naumu_post_message` with the attachmentId before then or the upload orphans.\n\nServer-side checks at post time enforce that the attachment was uploaded by you, in this graph, for this thread - you cannot reuse an upload across threads.',
1395
- inputSchema: z27.object({
1396
- threadId: z27.string().describe("Thread the attachment will land in. You must be a participant. The pending attachment is keyed to this thread - you cannot reuse it for a different one."),
1397
- fileName: z27.string().min(1).describe("Original filename (with extension). Used as the display name in the message and for the S3 object suffix. Special characters are sanitized server-side."),
1398
- fileType: z27.string().min(1).describe("MIME type, e.g. `application/pdf`, `image/png`, `text/markdown`, `audio/mpeg`, `video/mp4`. The S3 PUT will enforce this Content-Type."),
1399
- fileSize: z27.number().int().positive().describe("File size in bytes. Validated against per-MIME caps before the URL is issued - exceeding the cap returns a 400."),
1400
- audioDurationSec: z27.number().positive().optional().describe("For audio attachments, duration in seconds. Validated against the audio recording cap (currently 8 hours).")
1401
- })
1494
+ description: "Request a presigned S3 upload URL to attach a file - pass exactly one of `threadId`, `noteId`, or `canvasId` for where the upload will land, then PUT the bytes directly to the returned URL. Same flow Naumu users use for file uploads. User API keys and OAuth sessions must also pass `graphId` (a user spans many spaces; resolve it via `naumu_list_graphs`); bot keys resolve it automatically.\n\nThree destinations, three follow-up calls:\n\u2022 Thread: presign with `threadId` \u2192 PUT the bytes \u2192 call `naumu_post_message` with the returned `attachmentId` in `attachmentIds`.\n\u2022 Note: presign with `noteId` \u2192 PUT the bytes \u2192 call `naumu_note_append` (or any note write tool) with `![alt](attachment://<attachmentId>)` in the markdown. That single call binds the upload, embeds it inline as the note's canonical media node, and files it into the space's Files & Media library - the same syntax works for images, video, audio, and other files, dispatched by the upload's MIME type.\n\u2022 Canvas: presign with `canvasId` \u2192 PUT the bytes \u2192 call `naumu_persist_canvas_attachment` to extend the upload past its default 1-hour TTL. Placing the persisted attachment onto the canvas itself still happens in the app UI.\n\nTo attach media to a graph node, upload into a thread that originated or modified that node - files surface on the node via its threads; there is no separate node-attachment flow.\n\nPer-MIME size caps apply: 10MB for types the agent reads whole (image, text, PDF, office docs), otherwise the space plan's umbrella cap (50MB free, 500MB team, 1GB max). Audio takes the plan cap, NOT the 10MB agent-read budget - it is transcribed on upload and only the transcript reaches an agent, so a multi-hour recording is a legitimate attachment. Over-cap requests are refused with HTTP 413 before any URL is minted, and the size is re-checked at bind time against the object that actually landed - so an oversized upload is refused there too, not silently accepted.\n\nReturns `{ attachmentId, uploadUrl, method, requiredHeaders, expiresAt }`. Use these EXACTLY:\n\u2022 `method` is \"PUT\".\n\u2022 Send every header in `requiredHeaders`. It carries BOTH `Content-Type` and `Content-Length`, and both are load-bearing: `Content-Length` is signed INTO the URL, so the body must be exactly that many bytes or S3 answers 403. PUT the whole file as one fixed-length body - do not stream it, do not use chunked transfer encoding, and do not send a different byte count than the `fileSize` you declared here.\n\u2022 Do NOT add an Authorization header - the URL itself is the auth.\n\u2022 Do NOT log `uploadUrl` - it is a bearer capability for the duration of the TTL.\n\u2022 `expiresAt` is a Unix-ms timestamp; the pending attachment vanishes at that moment whether or not you uploaded. Bind it (post the message, embed the note reference, or persist the canvas attachment) before then or the upload orphans.\n\nServer-side checks at bind time enforce that the attachment was uploaded by you, in this graph, for this thread/note/canvas - you cannot reuse an upload across destinations.",
1495
+ inputSchema: z28.object({
1496
+ graphId: z28.string().optional().describe("Graph (space) UUID the destination lives in. REQUIRED for user API keys and OAuth sessions - a user spans many spaces, so nothing can infer it; resolve it once via `naumu_list_graphs` and reuse it. Bot keys may omit it: a bot is pinned to one graph and the tool resolves it automatically."),
1497
+ threadId: z28.string().optional().describe("Destination thread - presign for a thread when the upload will be attached to a chat message via `naumu_post_message`'s `attachmentIds`. You must be a participant. Exactly one of `threadId`, `noteId`, or `canvasId` is required. The pending attachment is keyed to this thread - you cannot reuse it for a different one."),
1498
+ noteId: z28.string().optional().describe("Destination note (Thought) - presign for a note when the upload will be embedded via `![alt](attachment://<attachmentId>)` in a note write tool call. Exactly one of `threadId`, `noteId`, or `canvasId` is required. The pending attachment is keyed to this note - you cannot reuse it for a different one."),
1499
+ canvasId: z28.string().optional().describe("Destination canvas - presign for a canvas when the upload will be placed on a canvas; follow up with `naumu_persist_canvas_attachment` to extend its TTL. Exactly one of `threadId`, `noteId`, or `canvasId` is required. The pending attachment is keyed to this canvas - you cannot reuse it for a different one."),
1500
+ fileName: z28.string().min(1).describe("Original filename (with extension). Used as the display name and for the S3 object suffix. Special characters are sanitized server-side."),
1501
+ fileType: z28.string().min(1).describe("MIME type, e.g. `application/pdf`, `image/png`, `text/markdown`, `audio/mpeg`, `video/mp4`. The S3 PUT will enforce this Content-Type."),
1502
+ fileSize: z28.number().int().positive().describe("File size in bytes, exact. Validated against per-MIME caps before the URL is issued - exceeding the cap returns a 413 (not a 400; 400 means a different rejection). This number is also signed into the upload URL as `Content-Length`, so it is a commitment, not an estimate: PUT exactly this many bytes. Audio is validated against the plan umbrella cap (50MB free / 500MB team / 1GB max), not the 10MB agent-read budget."),
1503
+ audioDurationSec: z28.number().positive().optional().describe("For audio attachments, duration in seconds. Send it whenever you know it: audio carries an 8-hour ceiling on top of the size cap, and nothing measures the file server-side, so that ceiling is checked ONLY against a length you report. Omitting it skips the check rather than failing it - the size cap is what still binds you. Omit it rather than guessing: a wrong value is worse than none, and a deliberate under-report is a policy violation, not a workaround.")
1504
+ }).refine(
1505
+ (data) => [data.threadId, data.noteId, data.canvasId].filter((v) => v !== void 0).length === 1,
1506
+ { message: "Exactly one of threadId, noteId, or canvasId is required - pick the single destination this upload is for." }
1507
+ )
1402
1508
  },
1403
- async ({ threadId, fileName, fileType, fileSize, audioDurationSec }) => {
1509
+ async ({ graphId, threadId, noteId, canvasId, fileName, fileType, fileSize, audioDurationSec }) => {
1404
1510
  try {
1405
- const me = await client2.get("/api/identities/me/whoami");
1511
+ let resolvedGraphId = graphId;
1512
+ if (resolvedGraphId === void 0) {
1513
+ const me = await client2.get("/api/identities/me/whoami");
1514
+ resolvedGraphId = me.graphId;
1515
+ }
1516
+ if (resolvedGraphId === void 0) {
1517
+ return {
1518
+ content: [{
1519
+ type: "text",
1520
+ text: "Error: graphId is required for this session. Your key is a user key, which spans multiple spaces - call naumu_list_graphs, pick the target space, and pass its id as graphId."
1521
+ }],
1522
+ isError: true
1523
+ };
1524
+ }
1406
1525
  const body = {
1407
- graphId: me.graphId,
1408
- threadId,
1526
+ graphId: resolvedGraphId,
1409
1527
  fileName,
1410
1528
  fileType,
1411
1529
  fileSize
1412
1530
  };
1531
+ if (threadId !== void 0) body.threadId = threadId;
1532
+ if (noteId !== void 0) body.noteId = noteId;
1533
+ if (canvasId !== void 0) body.canvasId = canvasId;
1413
1534
  if (audioDurationSec !== void 0) body.audioDurationSec = audioDurationSec;
1414
1535
  const data = await client2.post("/api/attachments/presign", body);
1415
1536
  return {
@@ -1426,8 +1547,38 @@ function registerRequestAttachmentUpload(server2, client2) {
1426
1547
  );
1427
1548
  }
1428
1549
 
1550
+ // ../mcp-core/src/tools/persist-canvas-attachment.ts
1551
+ import { z as z29 } from "zod";
1552
+ function registerPersistCanvasAttachment(server2, client2) {
1553
+ server2.registerTool(
1554
+ "naumu_persist_canvas_attachment",
1555
+ {
1556
+ title: "Persist Canvas Attachment",
1557
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1558
+ description: "Extend a canvas-bound pending attachment's TTL from its default 1 hour to 30 days; call right after `naumu_request_attachment_upload` (with `canvasId` set) and the S3 PUT, so the upload survives long enough to be used. This only persists the upload - actually placing it onto the canvas still happens in the app UI, there is no MCP canvas-editing tool yet. Safe to call more than once for the same attachmentId.",
1559
+ inputSchema: z29.object({
1560
+ attachmentId: z29.string().min(1).describe("The `attachmentId` returned by `naumu_request_attachment_upload` for this canvas.")
1561
+ })
1562
+ },
1563
+ async ({ attachmentId }) => {
1564
+ try {
1565
+ const data = await client2.post(`/api/attachments/${attachmentId}/persist-canvas`);
1566
+ return {
1567
+ content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
1568
+ };
1569
+ } catch (err) {
1570
+ const message = err instanceof Error ? err.message : String(err);
1571
+ return {
1572
+ content: [{ type: "text", text: `Error: ${message}` }],
1573
+ isError: true
1574
+ };
1575
+ }
1576
+ }
1577
+ );
1578
+ }
1579
+
1429
1580
  // ../mcp-core/src/tools/add-reaction.ts
1430
- import { z as z28 } from "zod";
1581
+ import { z as z30 } from "zod";
1431
1582
  function registerAddReaction(server2, client2) {
1432
1583
  server2.registerTool(
1433
1584
  "naumu_add_reaction",
@@ -1435,10 +1586,10 @@ function registerAddReaction(server2, client2) {
1435
1586
  title: "Add Reaction",
1436
1587
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1437
1588
  description: 'Add an emoji reaction to a message in a thread you are participating in; use for lightweight acknowledgement instead of posting a message. Idempotent - calling twice with the same emoji is a no-op (use `naumu_remove_reaction` to undo). Returns `{ ok, messageId, emoji, alreadyExisted, reactionCount, reactions }` so you can confirm the state without re-reading the thread; `alreadyExisted: true` means the reaction was already on the message and the call was a no-op.\n\nWhen to react vs. when to post a message:\n\u2022 React (no message) for lightweight acknowledgement (\u{1F440}, \u2705, \u{1F44D}), appreciation (\u2764\uFE0F, \u{1F64C}), laughter (\u{1F602}), or "I saw this".\n\u2022 Post a message for direct questions, clarification, important corrections, or final results - situations where words are required.\n\u2022 For long tasks: react \u{1F440} first to acknowledge, optionally post a short "On it - I\'ll report back" if the work will take >20s, do the work, then post the final result.\n\u2022 Ignore casual human banter, side-conversations someone else already answered, or anything where you would only say "ok"/"nice"/"lol".\n\nUse at most one reaction per message unless explicitly useful. Reactions are social backpressure relief, not a sparkle-confetti channel.',
1438
- inputSchema: z28.object({
1439
- threadId: z28.string().describe("Thread containing the message. You must be a participant."),
1440
- messageId: z28.string().describe("The message to react to."),
1441
- emoji: z28.string().min(1).describe('Emoji character (e.g. "\u{1F440}", "\u2705", "\u2764\uFE0F"). Custom-emoji shortcodes are NOT supported here - pass a real Unicode emoji.')
1589
+ inputSchema: z30.object({
1590
+ threadId: z30.string().describe("Thread containing the message. You must be a participant."),
1591
+ messageId: z30.string().describe("The message to react to."),
1592
+ emoji: z30.string().min(1).describe('Emoji character (e.g. "\u{1F440}", "\u2705", "\u2764\uFE0F"). Custom-emoji shortcodes are NOT supported here - pass a real Unicode emoji.')
1442
1593
  })
1443
1594
  },
1444
1595
  async ({ threadId, messageId, emoji }) => {
@@ -1462,7 +1613,7 @@ function registerAddReaction(server2, client2) {
1462
1613
  }
1463
1614
 
1464
1615
  // ../mcp-core/src/tools/remove-reaction.ts
1465
- import { z as z29 } from "zod";
1616
+ import { z as z31 } from "zod";
1466
1617
  function registerRemoveReaction(server2, client2) {
1467
1618
  server2.registerTool(
1468
1619
  "naumu_remove_reaction",
@@ -1470,10 +1621,10 @@ function registerRemoveReaction(server2, client2) {
1470
1621
  title: "Remove Reaction",
1471
1622
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1472
1623
  description: "Remove your own emoji reaction from a message; use to walk back an acknowledgement you previously added. Idempotent - calling on a reaction you never added is a no-op. Pair with `naumu_add_reaction` (e.g. you reacted \u{1F440} to start a task and want to clear it after a final result message lands). Returns `{ ok, messageId, emoji, alreadyExisted, reactionCount, reactions }` - `alreadyExisted: false` means there was nothing to remove and the call was a no-op.",
1473
- inputSchema: z29.object({
1474
- threadId: z29.string().describe("Thread containing the message. You must be a participant."),
1475
- messageId: z29.string().describe("The message to remove your reaction from."),
1476
- emoji: z29.string().min(1).describe("Emoji character to remove (must match what you originally reacted with).")
1624
+ inputSchema: z31.object({
1625
+ threadId: z31.string().describe("Thread containing the message. You must be a participant."),
1626
+ messageId: z31.string().describe("The message to remove your reaction from."),
1627
+ emoji: z31.string().min(1).describe("Emoji character to remove (must match what you originally reacted with).")
1477
1628
  })
1478
1629
  },
1479
1630
  async ({ threadId, messageId, emoji }) => {
@@ -1497,7 +1648,7 @@ function registerRemoveReaction(server2, client2) {
1497
1648
  }
1498
1649
 
1499
1650
  // ../mcp-core/src/tools/naumu-typing.ts
1500
- import { z as z30 } from "zod";
1651
+ import { z as z32 } from "zod";
1501
1652
  function registerNaumuTyping(server2, client2) {
1502
1653
  server2.registerTool(
1503
1654
  "naumu_typing",
@@ -1508,9 +1659,9 @@ function registerNaumuTyping(server2, client2) {
1508
1659
  // repeating the same state is a no-op renew, so idempotent.
1509
1660
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1510
1661
  description: 'Show or hide your "is typing\u2026" pill in a thread; use to signal that you are composing a reply. Call with `state: "start"` the moment you decide to compose a reply (before any LLM call), and the server holds the pill alive - re-broadcasting on a short interval - until you stop, post a message, or the lease cap (~5 min) fires. You do NOT need to refresh on a timer; that\'s the lease\'s job.\n\nThe pill clears automatically when:\n\u2022 you call this tool with `state: "stop"`\n\u2022 you call `naumu_post_message` for the same thread (cleared on commit)\n\u2022 the lease cap expires\n\nUse `start` whenever you start work, even if you might end up not replying - call `stop` if you decide NOT to post. Calling `start` while a lease is already active renews it (resets the cap), so a long-running run can call `start` again as a heartbeat without breaking the indicator. You must be a participant of the thread.',
1511
- inputSchema: z30.object({
1512
- threadId: z30.string().describe("The thread ID to set typing in. You must be a participant."),
1513
- state: z30.enum(["start", "stop"]).describe('"start" acquires/renews the lease; "stop" ends it and clears the pill immediately.')
1662
+ inputSchema: z32.object({
1663
+ threadId: z32.string().describe("The thread ID to set typing in. You must be a participant."),
1664
+ state: z32.enum(["start", "stop"]).describe('"start" acquires/renews the lease; "stop" ends it and clears the pill immediately.')
1514
1665
  })
1515
1666
  },
1516
1667
  async ({ threadId, state }) => {
@@ -1531,7 +1682,7 @@ function registerNaumuTyping(server2, client2) {
1531
1682
  }
1532
1683
 
1533
1684
  // ../mcp-core/src/tools/note-read.ts
1534
- import { z as z31 } from "zod";
1685
+ import { z as z33 } from "zod";
1535
1686
  function registerNoteRead(server2, client2) {
1536
1687
  server2.registerTool(
1537
1688
  "naumu_note_read",
@@ -1539,8 +1690,8 @@ function registerNoteRead(server2, client2) {
1539
1690
  title: "Read Note",
1540
1691
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
1541
1692
  description: "Read the current contents of a note as markdown; use before editing so you know what you're working with. `naumu_note_find_replace` and the section-based tools (`naumu_note_insert`, `naumu_note_replace_section`, `naumu_note_delete_section`) anchor on text/headings present in the live doc.",
1542
- inputSchema: z31.object({
1543
- noteId: z31.string().describe("The note (Thought) ID")
1693
+ inputSchema: z33.object({
1694
+ noteId: z33.string().describe("The note (Thought) ID")
1544
1695
  })
1545
1696
  },
1546
1697
  async ({ noteId }) => {
@@ -1553,17 +1704,17 @@ function registerNoteRead(server2, client2) {
1553
1704
  }
1554
1705
 
1555
1706
  // ../mcp-core/src/tools/note-append.ts
1556
- import { z as z32 } from "zod";
1707
+ import { z as z34 } from "zod";
1557
1708
  function registerNoteAppend(server2, client2) {
1558
1709
  server2.registerTool(
1559
1710
  "naumu_note_append",
1560
1711
  {
1561
1712
  title: "Append to Note",
1562
1713
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1563
- description: "Append markdown blocks to the end of a note; use for additive note writing that never touches existing content. Other participants see your colored cursor while the write lands. Markdown supports headings (1-3), bold/italic/code, lists, blockquotes, code blocks, links, and tables.",
1564
- inputSchema: z32.object({
1565
- noteId: z32.string().describe("The note (Thought) ID to append to"),
1566
- markdown: z32.string().min(1).describe("Markdown content to append at the end of the note")
1714
+ description: "Append markdown blocks to the end of a note; use for additive note writing that never touches existing content. Other participants see your colored cursor while the write lands. Markdown supports headings (1-3), bold/italic/code, lists, blockquotes, code blocks, links, and tables. To embed media, write `![alt](attachment://<attachmentId>)` as a sole-line image - the id must come from `naumu_request_attachment_upload` presigned with this same `noteId`. The one syntax covers images, video, audio, and other files, dispatched by the upload's MIME type into the note's canonical media node; an unresolvable or wrong-note id fails the whole write with a 400 naming the bad id. An id already embedded in the note can be repeated safely without re-uploading.",
1715
+ inputSchema: z34.object({
1716
+ noteId: z34.string().describe("The note (Thought) ID to append to"),
1717
+ markdown: z34.string().min(1).describe("Markdown content to append at the end of the note")
1567
1718
  })
1568
1719
  },
1569
1720
  async ({ noteId, markdown }) => {
@@ -1576,18 +1727,18 @@ function registerNoteAppend(server2, client2) {
1576
1727
  }
1577
1728
 
1578
1729
  // ../mcp-core/src/tools/note-insert.ts
1579
- import { z as z33 } from "zod";
1730
+ import { z as z35 } from "zod";
1580
1731
  function registerNoteInsert(server2, client2) {
1581
1732
  server2.registerTool(
1582
1733
  "naumu_note_insert",
1583
1734
  {
1584
1735
  title: "Insert After Heading",
1585
1736
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1586
- description: "Insert markdown content into a note immediately after a named section; use to add content under a specific heading without rewriting it. The section ends at the next heading of equal-or-higher level (or end of doc). 404 if no heading matches `headingText` exactly - call `naumu_note_read` first to see the live structure.",
1587
- inputSchema: z33.object({
1588
- noteId: z33.string().describe("The note (Thought) ID"),
1589
- headingText: z33.string().min(1).describe("Exact text of the heading whose section the new content follows"),
1590
- markdown: z33.string().min(1).describe("Markdown content to insert at the end of that section")
1737
+ description: "Insert markdown content into a note immediately after a named section; use to add content under a specific heading without rewriting it. The section ends at the next heading of equal-or-higher level (or end of doc). 404 if no heading matches `headingText` exactly - call `naumu_note_read` first to see the live structure. To embed media, write `![alt](attachment://<attachmentId>)` as a sole-line image - the id must come from `naumu_request_attachment_upload` presigned with this same `noteId`. The one syntax covers images, video, audio, and other files, dispatched by the upload's MIME type; an unresolvable or wrong-note id fails the whole write with a 400 naming the bad id.",
1738
+ inputSchema: z35.object({
1739
+ noteId: z35.string().describe("The note (Thought) ID"),
1740
+ headingText: z35.string().min(1).describe("Exact text of the heading whose section the new content follows"),
1741
+ markdown: z35.string().min(1).describe("Markdown content to insert at the end of that section")
1591
1742
  })
1592
1743
  },
1593
1744
  async ({ noteId, headingText, markdown }) => {
@@ -1603,19 +1754,19 @@ function registerNoteInsert(server2, client2) {
1603
1754
  }
1604
1755
 
1605
1756
  // ../mcp-core/src/tools/note-replace-section.ts
1606
- import { z as z34 } from "zod";
1757
+ import { z as z36 } from "zod";
1607
1758
  function registerNoteReplaceSection(server2, client2) {
1608
1759
  server2.registerTool(
1609
1760
  "naumu_note_replace_section",
1610
1761
  {
1611
1762
  title: "Replace Section",
1612
1763
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
1613
- description: "Replace the body under a named heading with new markdown; use to rewrite one section of a note while leaving the rest intact. By default the heading row itself is preserved (set `keepHeading: false` to drop it too). 404 if no heading matches.",
1614
- inputSchema: z34.object({
1615
- noteId: z34.string().describe("The note (Thought) ID"),
1616
- headingText: z34.string().min(1).describe("Exact text of the heading anchoring the section"),
1617
- markdown: z34.string().describe("Replacement markdown for the section body"),
1618
- keepHeading: z34.boolean().optional().describe("Whether to keep the heading row itself. Default true.")
1764
+ description: "Replace the body under a named heading with new markdown; use to rewrite one section of a note while leaving the rest intact. By default the heading row itself is preserved (set `keepHeading: false` to drop it too). 404 if no heading matches. To embed media, write `![alt](attachment://<attachmentId>)` as a sole-line image - the id must come from `naumu_request_attachment_upload` presigned with this same `noteId`. The one syntax covers images, video, audio, and other files, dispatched by the upload's MIME type; an unresolvable or wrong-note id fails the whole write with a 400 naming the bad id. An id already embedded elsewhere in the note can be repeated safely without re-uploading.",
1765
+ inputSchema: z36.object({
1766
+ noteId: z36.string().describe("The note (Thought) ID"),
1767
+ headingText: z36.string().min(1).describe("Exact text of the heading anchoring the section"),
1768
+ markdown: z36.string().describe("Replacement markdown for the section body"),
1769
+ keepHeading: z36.boolean().optional().describe("Whether to keep the heading row itself. Default true.")
1619
1770
  })
1620
1771
  },
1621
1772
  async ({ noteId, headingText, markdown, keepHeading }) => {
@@ -1632,7 +1783,7 @@ function registerNoteReplaceSection(server2, client2) {
1632
1783
  }
1633
1784
 
1634
1785
  // ../mcp-core/src/tools/note-delete-section.ts
1635
- import { z as z35 } from "zod";
1786
+ import { z as z37 } from "zod";
1636
1787
  function registerNoteDeleteSection(server2, client2) {
1637
1788
  server2.registerTool(
1638
1789
  "naumu_note_delete_section",
@@ -1640,9 +1791,9 @@ function registerNoteDeleteSection(server2, client2) {
1640
1791
  title: "Delete Section",
1641
1792
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
1642
1793
  description: "\u26A0 DESTRUCTIVE: remove a heading row plus its body (down to the next heading of equal-or-higher level); ONLY use when the user explicitly asks to drop a section. Anything inside that section is gone - there is no per-call undo. If you're unsure which heading they meant, call `naumu_note_read` first to see the current structure. Returns 404 if `headingText` does not exactly match any live heading.",
1643
- inputSchema: z35.object({
1644
- noteId: z35.string().describe("The note (Thought) ID"),
1645
- headingText: z35.string().min(1).describe("Exact text of the heading whose section will be deleted")
1794
+ inputSchema: z37.object({
1795
+ noteId: z37.string().describe("The note (Thought) ID"),
1796
+ headingText: z37.string().min(1).describe("Exact text of the heading whose section will be deleted")
1646
1797
  })
1647
1798
  },
1648
1799
  async ({ noteId, headingText }) => {
@@ -1657,17 +1808,17 @@ function registerNoteDeleteSection(server2, client2) {
1657
1808
  }
1658
1809
 
1659
1810
  // ../mcp-core/src/tools/note-replace.ts
1660
- import { z as z36 } from "zod";
1811
+ import { z as z38 } from "zod";
1661
1812
  function registerNoteReplace(server2, client2) {
1662
1813
  server2.registerTool(
1663
1814
  "naumu_note_replace",
1664
1815
  {
1665
1816
  title: "Replace Note",
1666
1817
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
1667
- description: "\u26A0 DESTRUCTIVE: replace the entire note content with new markdown; ONLY use when the user explicitly asks to rewrite/replace the whole note. Any concurrent human edits made during the call are silently overwritten. For additive work prefer `naumu_note_append`. For section-level edits use `naumu_note_replace_section`. For inline tweaks use `naumu_note_find_replace`. Read with `naumu_note_read` first if you weren't the last writer.",
1668
- inputSchema: z36.object({
1669
- noteId: z36.string().describe("The note (Thought) ID"),
1670
- markdown: z36.string().describe("New markdown content for the entire note")
1818
+ description: "\u26A0 DESTRUCTIVE: replace the entire note content with new markdown; ONLY use when the user explicitly asks to rewrite/replace the whole note. Any concurrent human edits made during the call are silently overwritten. For additive work prefer `naumu_note_append`. For section-level edits use `naumu_note_replace_section`. For inline tweaks use `naumu_note_find_replace`. Read with `naumu_note_read` first if you weren't the last writer. To embed media, write `![alt](attachment://<attachmentId>)` as a sole-line image - the id must come from `naumu_request_attachment_upload` presigned with this same `noteId`. The one syntax covers images, video, audio, and other files, dispatched by the upload's MIME type; an unresolvable or wrong-note id fails the whole write with a 400 naming the bad id. Ids already embedded in the note (read them back via `naumu_note_read`) can be repeated safely without re-uploading.",
1819
+ inputSchema: z38.object({
1820
+ noteId: z38.string().describe("The note (Thought) ID"),
1821
+ markdown: z38.string().describe("New markdown content for the entire note")
1671
1822
  })
1672
1823
  },
1673
1824
  async ({ noteId, markdown }) => {
@@ -1680,19 +1831,19 @@ function registerNoteReplace(server2, client2) {
1680
1831
  }
1681
1832
 
1682
1833
  // ../mcp-core/src/tools/note-find-replace.ts
1683
- import { z as z37 } from "zod";
1834
+ import { z as z39 } from "zod";
1684
1835
  function registerNoteFindReplace(server2, client2) {
1685
1836
  server2.registerTool(
1686
1837
  "naumu_note_find_replace",
1687
1838
  {
1688
1839
  title: "Find/Replace in Note",
1689
1840
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
1690
- description: "Literal find/replace within a note's text content; use for mid-paragraph tweaks the section-based tools can't target. Marks (bold, italic, code, etc.) are preserved on the surrounding text. \u26A0 The match is literal-substring across every text leaf in the doc; an overly generic `find` (e.g. \" a \") can rewrite the doc unrecognizably. Pick a phrase distinctive enough to land where you mean. By default replaces every occurrence; set `all: false` for first-only. Returns `{ replacements }` so you can sanity-check the count.",
1691
- inputSchema: z37.object({
1692
- noteId: z37.string().describe("The note (Thought) ID"),
1693
- find: z37.string().min(1).describe("Substring to search for. Literal - no regex."),
1694
- replace: z37.string().describe("Replacement string. May be empty to delete the match."),
1695
- all: z37.boolean().optional().describe("Replace all occurrences (default true). Pass false to replace only the first.")
1841
+ description: "Literal find/replace within a note's text content; use for mid-paragraph tweaks the section-based tools can't target. Marks (bold, italic, code, etc.) are preserved on the surrounding text. \u26A0 The match is literal-substring across every text leaf in the doc; an overly generic `find` (e.g. \" a \") can rewrite the doc unrecognizably. Pick a phrase distinctive enough to land where you mean. By default replaces every occurrence; set `all: false` for first-only. Returns `{ replacements }` so you can sanity-check the count. `replace` can embed media by containing `![alt](attachment://<attachmentId>)` as a sole-line image - the id must come from `naumu_request_attachment_upload` presigned with this same `noteId`; an unresolvable or wrong-note id fails the whole write with a 400 naming the bad id.",
1842
+ inputSchema: z39.object({
1843
+ noteId: z39.string().describe("The note (Thought) ID"),
1844
+ find: z39.string().min(1).describe("Substring to search for. Literal - no regex."),
1845
+ replace: z39.string().describe("Replacement string. May be empty to delete the match."),
1846
+ all: z39.boolean().optional().describe("Replace all occurrences (default true). Pass false to replace only the first.")
1696
1847
  })
1697
1848
  },
1698
1849
  async ({ noteId, find, replace, all }) => {
@@ -1709,7 +1860,7 @@ function registerNoteFindReplace(server2, client2) {
1709
1860
  }
1710
1861
 
1711
1862
  // ../mcp-core/src/tools/create-note.ts
1712
- import { z as z38 } from "zod";
1863
+ import { z as z40 } from "zod";
1713
1864
  function registerCreateNote(server2, client2) {
1714
1865
  server2.registerTool(
1715
1866
  "naumu_create_note",
@@ -1717,11 +1868,11 @@ function registerCreateNote(server2, client2) {
1717
1868
  title: "Create Note",
1718
1869
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
1719
1870
  description: "Create a new empty note in a graph; use when you need a fresh note to write into. 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, and a bot-created note is private (participants only) unless `sharedWithSpace` is set true. Bots cannot file notes into topics \u2014 a bot passing `topicIds` is rejected (bots hold no topic membership); use `sharedWithSpace` instead.",
1720
- inputSchema: z38.object({
1721
- graphId: z38.string().describe("The graph ID to create the note in"),
1722
- title: z38.string().optional().describe("Optional title for the note"),
1723
- sharedWithSpace: z38.boolean().optional().describe("Share the note with everyone in the space. Omit (or false) to keep it private to its participants."),
1724
- topicIds: z38.array(z38.string()).max(8).optional().describe("File the note into these topics (get ids from naumu_list_topics), making it visible to those topics' members. Not available to bots.")
1871
+ inputSchema: z40.object({
1872
+ graphId: z40.string().describe("The graph ID to create the note in"),
1873
+ title: z40.string().optional().describe("Optional title for the note"),
1874
+ sharedWithSpace: z40.boolean().optional().describe("Share the note with everyone in the space. Omit (or false) to keep it private to its participants."),
1875
+ topicIds: z40.array(z40.string()).max(8).optional().describe("File the note into these topics (get ids from naumu_list_topics), making it visible to those topics' members. Not available to bots.")
1725
1876
  })
1726
1877
  },
1727
1878
  async ({ graphId, title, sharedWithSpace, topicIds }) => {
@@ -1734,7 +1885,7 @@ function registerCreateNote(server2, client2) {
1734
1885
  }
1735
1886
 
1736
1887
  // ../mcp-core/src/tools/list-schema-violations.ts
1737
- import { z as z39 } from "zod";
1888
+ import { z as z41 } from "zod";
1738
1889
  var DEFAULT_EXAMPLE_LIMIT = 5;
1739
1890
  var rowsForKind = (violations, kind) => {
1740
1891
  const rows = [];
@@ -1760,12 +1911,12 @@ function registerListSchemaViolations(server2, client2) {
1760
1911
  title: "List Schema Violations",
1761
1912
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
1762
1913
  description: "Audit a graph against its schema. By default returns a compact summary: total counts plus, for each violation kind, its count and up to 5 example nodes (id/label/type/message) \u2014 small enough not to flood the client. Violation kinds: parent_missing (schema expects a parent edge that does not exist), parent_multiple (more than one parent edge where one is expected), parent_mismatch (parent edge has wrong target type or relation label), parent_not_backbone (an edge uses a backbone/parent relation but is not stored as a backbone edge, so the subtree stays off the hierarchy), unknown_relation (edge uses a relation not in the schema), invalid_connection_target (edge connects to a type the schema does not allow for this source), unknown_type (node carries a type no longer in the schema), disconnected (node heads a group with no backbone path to the main tree). To see every node for one kind, pass `kind` to filter; `limit` caps how many rows are returned (examples in the default summary, or full rows when `kind` is set). Use for audits, import-verification, and CI-style checks after batch writes.",
1763
- inputSchema: z39.object({
1764
- graphId: z39.string().describe("The graph ID"),
1765
- kind: z39.string().optional().describe(
1914
+ inputSchema: z41.object({
1915
+ graphId: z41.string().describe("The graph ID"),
1916
+ kind: z41.string().optional().describe(
1766
1917
  'Drill into one violation kind (e.g. "parent_not_backbone"). Returns the full list of nodes with that kind, up to `limit`, instead of the summary.'
1767
1918
  ),
1768
- limit: z39.number().int().min(1).optional().describe(
1919
+ limit: z41.number().int().min(1).optional().describe(
1769
1920
  "Max rows to return. When `kind` is set, caps the full drill-down list (default: all). Otherwise caps example nodes per kind in the summary (default: 5)."
1770
1921
  )
1771
1922
  })
@@ -1817,7 +1968,7 @@ function registerListSchemaViolations(server2, client2) {
1817
1968
  }
1818
1969
 
1819
1970
  // ../mcp-core/src/tools/list-dense-nodes.ts
1820
- import { z as z40 } from "zod";
1971
+ import { z as z42 } from "zod";
1821
1972
  function registerListDenseNodes(server2, client2) {
1822
1973
  server2.registerTool(
1823
1974
  "naumu_list_dense_nodes",
@@ -1825,10 +1976,10 @@ function registerListDenseNodes(server2, client2) {
1825
1976
  title: "List Dense Nodes",
1826
1977
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
1827
1978
  description: 'Return nodes whose child count (children via parent edges; mesh cross-links don\'t count) is \u2265 minConnections, grouped by type; use for /restructure hub detection. Each row includes `same_typed_child_count` - the number of children of the SAME type as the node (the Naumu hub-pattern signal) and `connection_count` - its total children. Sort the response by `same_typed_child_count` descending and route any node with \u226510 same-typed children through a mini-hub split. Pass `nodeTypes` (comma-separated) to restrict to a subset (e.g. ["Type A","Type B"]). Cheap to call - runs a single Cypher aggregation.',
1828
- inputSchema: z40.object({
1829
- graphId: z40.string().describe("The graph ID"),
1830
- minConnections: z40.number().int().min(1).describe("Minimum number of children (parent edges; mesh cross-links excluded). Typical: 10 for hub detection, 11 to count only hubs that exceed the round-4 \u226410 threshold."),
1831
- nodeTypes: z40.array(z40.string()).optional().describe("Optional list of node types to restrict the scan to.")
1979
+ inputSchema: z42.object({
1980
+ graphId: z42.string().describe("The graph ID"),
1981
+ minConnections: z42.number().int().min(1).describe("Minimum number of children (parent edges; mesh cross-links excluded). Typical: 10 for hub detection, 11 to count only hubs that exceed the round-4 \u226410 threshold."),
1982
+ nodeTypes: z42.array(z42.string()).optional().describe("Optional list of node types to restrict the scan to.")
1832
1983
  })
1833
1984
  },
1834
1985
  async ({ graphId, minConnections, nodeTypes }) => {
@@ -1846,7 +1997,7 @@ function registerListDenseNodes(server2, client2) {
1846
1997
  }
1847
1998
 
1848
1999
  // ../mcp-core/src/tools/list-node-connections.ts
1849
- import { z as z41 } from "zod";
2000
+ import { z as z43 } from "zod";
1850
2001
  function registerListNodeConnections(server2, client2) {
1851
2002
  server2.registerTool(
1852
2003
  "naumu_list_node_connections",
@@ -1854,11 +2005,11 @@ function registerListNodeConnections(server2, client2) {
1854
2005
  title: "List Node Connections",
1855
2006
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
1856
2007
  description: 'Return a single node\'s edges (non-system) with the connected node on the other side; use during /restructure to confirm mini-hub candidates and verify reparenting outcomes. Filter with `edgeType` (relation label) and `direction` ("in" | "out" | "both", default both). Response: `{ node: {id,label,type}, edges: [{relation, direction, isParent, other: {id,label,type}}] }`.',
1857
- inputSchema: z41.object({
1858
- graphId: z41.string().describe("The graph ID"),
1859
- nodeId: z41.string().describe("The node ID to inspect"),
1860
- edgeType: z41.string().optional().describe('Restrict to a specific relation label (e.g. "ASSOCIATED_WITH"). Case-insensitive; non-alphanum chars are normalized.'),
1861
- direction: z41.enum(["in", "out", "both"]).optional().describe('Edge direction filter - "in" (incoming), "out" (outgoing), "both" (default).')
2008
+ inputSchema: z43.object({
2009
+ graphId: z43.string().describe("The graph ID"),
2010
+ nodeId: z43.string().describe("The node ID to inspect"),
2011
+ edgeType: z43.string().optional().describe('Restrict to a specific relation label (e.g. "ASSOCIATED_WITH"). Case-insensitive; non-alphanum chars are normalized.'),
2012
+ direction: z43.enum(["in", "out", "both"]).optional().describe('Edge direction filter - "in" (incoming), "out" (outgoing), "both" (default).')
1862
2013
  })
1863
2014
  },
1864
2015
  async ({ graphId, nodeId, edgeType, direction }) => {
@@ -1876,7 +2027,7 @@ function registerListNodeConnections(server2, client2) {
1876
2027
  }
1877
2028
 
1878
2029
  // ../mcp-core/src/tools/reparent.ts
1879
- import { z as z42 } from "zod";
2030
+ import { z as z44 } from "zod";
1880
2031
  function registerReparent(server2, client2) {
1881
2032
  server2.registerTool(
1882
2033
  "naumu_reparent",
@@ -1884,11 +2035,11 @@ function registerReparent(server2, client2) {
1884
2035
  title: "Reparent Node",
1885
2036
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1886
2037
  description: 'Atomically swap a node\'s parent edge; use to move a child under a different parent (e.g. during /restructure to reparent children under newly-created mini-hubs). Deletes any existing `isParent: true` edges on the node and creates a new one to `newParentId` with relation `newRelation`. Preserves the node\'s id, content, attributes, and embedding - does NOT trigger embedding regeneration because only the parent edge changes. Idempotent: if the node already has the requested parent edge, response is `status: "skipped"`. Response shape: `{nodeId, oldParentId, newParentId, newRelation, status: "moved" | "skipped"}`.',
1887
- inputSchema: z42.object({
1888
- graphId: z42.string().describe("The graph ID"),
1889
- nodeId: z42.string().describe("The child node to reparent"),
1890
- newParentId: z42.string().describe("The new parent node id"),
1891
- newRelation: z42.string().describe('The new parent edge relation label (e.g. "PART_OF"). Must be valid per the schema for (child.type, relation, parent.type).')
2038
+ inputSchema: z44.object({
2039
+ graphId: z44.string().describe("The graph ID"),
2040
+ nodeId: z44.string().describe("The child node to reparent"),
2041
+ newParentId: z44.string().describe("The new parent node id"),
2042
+ newRelation: z44.string().describe('The new parent edge relation label (e.g. "PART_OF"). Must be valid per the schema for (child.type, relation, parent.type).')
1892
2043
  })
1893
2044
  },
1894
2045
  async ({ graphId, nodeId, newParentId, newRelation }) => {
@@ -1904,7 +2055,7 @@ function registerReparent(server2, client2) {
1904
2055
  }
1905
2056
 
1906
2057
  // ../mcp-core/src/tools/batch-reparent.ts
1907
- import { z as z43 } from "zod";
2058
+ import { z as z45 } from "zod";
1908
2059
  function registerBatchReparent(server2, client2) {
1909
2060
  server2.registerTool(
1910
2061
  "naumu_batch_reparent",
@@ -1912,11 +2063,11 @@ function registerBatchReparent(server2, client2) {
1912
2063
  title: "Batch Reparent Nodes",
1913
2064
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1914
2065
  description: 'Reparent 1-25 nodes onto a shared `newParentId` with the same `newRelation`; use to move a same-typed cluster under a freshly-created mini-hub in /restructure. 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?}]`.',
1915
- inputSchema: z43.object({
1916
- graphId: z43.string().describe("The graph ID"),
1917
- newParentId: z43.string().describe("Parent node id every nodeId in the batch will be parented to"),
1918
- newRelation: z43.string().describe("Parent edge relation label (must be valid per schema for child.type \u2192 parent.type)"),
1919
- nodeIds: z43.array(z43.string()).min(1).max(25).describe("1\u201325 child node ids to reparent under `newParentId`")
2066
+ inputSchema: z45.object({
2067
+ graphId: z45.string().describe("The graph ID"),
2068
+ newParentId: z45.string().describe("Parent node id every nodeId in the batch will be parented to"),
2069
+ newRelation: z45.string().describe("Parent edge relation label (must be valid per schema for child.type \u2192 parent.type)"),
2070
+ nodeIds: z45.array(z45.string()).min(1).max(25).describe("1\u201325 child node ids to reparent under `newParentId`")
1920
2071
  })
1921
2072
  },
1922
2073
  async ({ graphId, newParentId, newRelation, nodeIds }) => {
@@ -1933,7 +2084,7 @@ function registerBatchReparent(server2, client2) {
1933
2084
  }
1934
2085
 
1935
2086
  // ../mcp-core/src/tools/chatgpt-search.ts
1936
- import { z as z44 } from "zod";
2087
+ import { z as z46 } from "zod";
1937
2088
 
1938
2089
  // ../mcp-core/src/public-origin.ts
1939
2090
  function publicOrigin() {
@@ -1987,8 +2138,10 @@ function registerChatgptSearch(server2, client2) {
1987
2138
  title: "Search",
1988
2139
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
1989
2140
  description: "Search across all of the knowledge graphs (spaces) you can access and return the most relevant nodes. Returns `{ results: [{ id, title, url }] }`. Pass each result `id` to the `fetch` tool to read the full node. (This is the cross-space entry point for ChatGPT/Deep Research; within a single space, `naumu_search` exposes more controls.)",
1990
- inputSchema: z44.object({
1991
- query: z44.string().describe('Search query text. Mix synonyms and exact tokens freely (e.g. "auth login SSO 2fa").')
2141
+ inputSchema: z46.object({
2142
+ query: z46.string().describe(
2143
+ "A short contiguous phrase \u2014 an entity name, label, or ID. The text half matches it verbatim as a case-insensitive substring; the semantic half matches meaning."
2144
+ )
1992
2145
  })
1993
2146
  },
1994
2147
  async ({ query }) => {
@@ -2020,7 +2173,7 @@ function registerChatgptSearch(server2, client2) {
2020
2173
  }
2021
2174
 
2022
2175
  // ../mcp-core/src/tools/chatgpt-fetch.ts
2023
- import { z as z45 } from "zod";
2176
+ import { z as z47 } from "zod";
2024
2177
  var NON_ATTRIBUTE_PROPS = /* @__PURE__ */ new Set([
2025
2178
  "id",
2026
2179
  "label",
@@ -2085,8 +2238,8 @@ function registerChatgptFetch(server2, client2) {
2085
2238
  title: "Fetch",
2086
2239
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
2087
2240
  description: "Fetch the full contents of a node returned by the `search` tool. Pass the result `id` verbatim (format `<graphId>:<nodeId>`). Returns `{ id, title, text, url }` where `text` is the node content plus its type, attributes, and connections.",
2088
- inputSchema: z45.object({
2089
- id: z45.string().describe("A resource id from a previous `search` result, in the form `<graphId>:<nodeId>`.")
2241
+ inputSchema: z47.object({
2242
+ id: z47.string().describe("A resource id from a previous `search` result, in the form `<graphId>:<nodeId>`.")
2090
2243
  })
2091
2244
  },
2092
2245
  async ({ id }) => {
@@ -2129,7 +2282,7 @@ function registerChatgptFetch(server2, client2) {
2129
2282
  }
2130
2283
 
2131
2284
  // ../mcp-core/src/tools/admission-status.ts
2132
- import { z as z46 } from "zod";
2285
+ import { z as z48 } from "zod";
2133
2286
  function registerAdmissionStatus(server2, client2) {
2134
2287
  server2.registerTool(
2135
2288
  "naumu_admission_status",
@@ -2137,8 +2290,8 @@ function registerAdmissionStatus(server2, client2) {
2137
2290
  title: "Admission Status",
2138
2291
  annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
2139
2292
  description: "Show who can auto-join a Naumu space (graph) and who is waiting for approval: the whitelisted emails (people who join the moment they sign in with that email), the auto-join domain wildcards, and the count of pending join requests. When there are pending requests, this also returns the full list (who requested, their email, git-email hint, and message) so you can act on them with naumu_resolve_join_request. Use it during repo init to review or seed access, or whenever the user asks who has access to a space or who is asking to join.",
2140
- inputSchema: z46.object({
2141
- graphId: z46.string().describe("The space (graph) ID to inspect admission for. You must be a member of this space.")
2293
+ inputSchema: z48.object({
2294
+ graphId: z48.string().describe("The space (graph) ID to inspect admission for. You must be a member of this space.")
2142
2295
  })
2143
2296
  },
2144
2297
  async ({ graphId }) => {
@@ -2168,7 +2321,7 @@ function registerAdmissionStatus(server2, client2) {
2168
2321
  }
2169
2322
 
2170
2323
  // ../mcp-core/src/tools/whitelist-members.ts
2171
- import { z as z47 } from "zod";
2324
+ import { z as z49 } from "zod";
2172
2325
  function registerWhitelistMembers(server2, client2) {
2173
2326
  server2.registerTool(
2174
2327
  "naumu_whitelist_members",
@@ -2181,10 +2334,10 @@ function registerWhitelistMembers(server2, client2) {
2181
2334
  openWorldHint: false
2182
2335
  },
2183
2336
  description: "Whitelist emails so those people auto-join a Naumu space (graph) the moment they sign in with that email. Use this during repo init: after you scrub git history, present the curated list of collaborators to the user, and get their explicit confirmation, call this with the confirmed emails. It is silent - it sends no invite emails, it just pre-authorizes those addresses. Returns which entries were created and which were skipped (already whitelisted or already members). Set repoInit true when this call is part of the repo init flow.",
2184
- inputSchema: z47.object({
2185
- graphId: z47.string().describe("The space (graph) ID to whitelist emails for. You must be a member of this space."),
2186
- emails: z47.array(z47.string()).min(1).describe("The emails to whitelist. Each becomes an exact-match auto-join entry. Present these to the user and get confirmation before calling."),
2187
- repoInit: z47.boolean().optional().describe("Set true when this whitelist is being seeded as part of the repo init flow, so onboarding is tracked correctly.")
2337
+ inputSchema: z49.object({
2338
+ graphId: z49.string().describe("The space (graph) ID to whitelist emails for. You must be a member of this space."),
2339
+ emails: z49.array(z49.string()).min(1).describe("The emails to whitelist. Each becomes an exact-match auto-join entry. Present these to the user and get confirmation before calling."),
2340
+ repoInit: z49.boolean().optional().describe("Set true when this whitelist is being seeded as part of the repo init flow, so onboarding is tracked correctly.")
2188
2341
  })
2189
2342
  },
2190
2343
  async ({ graphId, emails, repoInit }) => {
@@ -2208,7 +2361,7 @@ function registerWhitelistMembers(server2, client2) {
2208
2361
  }
2209
2362
 
2210
2363
  // ../mcp-core/src/tools/resolve-admission.ts
2211
- import { z as z48 } from "zod";
2364
+ import { z as z50 } from "zod";
2212
2365
  function registerResolveAdmission(server2, client2) {
2213
2366
  server2.registerTool(
2214
2367
  "naumu_resolve_admission",
@@ -2221,9 +2374,9 @@ function registerResolveAdmission(server2, client2) {
2221
2374
  openWorldHint: false
2222
2375
  },
2223
2376
  description: "The call a coding agent makes right after connecting when a repo's .naumu references a space the user is not yet a member of. It evaluates whether the user can join and does it: outcome is joined-whitelist or joined-wildcard (the user is now a member - proceed), already-member (nothing to do), request-created (a join request was just filed and is awaiting a member's approval), or request-pending (a request was already open). When the response also carries reason 'seat-limit' on a request-created/request-pending outcome, the user WOULD have auto-joined via a whitelist/domain match but the space is at its seat limit - so their access is pending an admin approving them or upgrading the plan; relay that specific reason honestly, do not just say 'no match'. Pass gitEmailHint from `git config user.email` so a matching whitelist or domain rule can admit them. Relay the outcome to the user honestly: say plainly whether they joined or are waiting for approval - never imply access that is still pending.",
2224
- inputSchema: z48.object({
2225
- graphId: z48.string().describe("The space (graph) ID referenced by the repo .naumu file that the user wants to join."),
2226
- gitEmailHint: z48.string().optional().describe("The email from `git config user.email`, used to match whitelist entries and auto-join domains.")
2377
+ inputSchema: z50.object({
2378
+ graphId: z50.string().describe("The space (graph) ID referenced by the repo .naumu file that the user wants to join."),
2379
+ gitEmailHint: z50.string().optional().describe("The email from `git config user.email`, used to match whitelist entries and auto-join domains.")
2227
2380
  })
2228
2381
  },
2229
2382
  async ({ graphId, gitEmailHint }) => {
@@ -2247,7 +2400,7 @@ function registerResolveAdmission(server2, client2) {
2247
2400
  }
2248
2401
 
2249
2402
  // ../mcp-core/src/tools/resolve-join-request.ts
2250
- import { z as z49 } from "zod";
2403
+ import { z as z51 } from "zod";
2251
2404
  function registerResolveJoinRequest(server2, client2) {
2252
2405
  server2.registerTool(
2253
2406
  "naumu_resolve_join_request",
@@ -2260,10 +2413,10 @@ function registerResolveJoinRequest(server2, client2) {
2260
2413
  openWorldHint: false
2261
2414
  },
2262
2415
  description: "For a member resolving a pending join request surfaced by naumu_admission_status. Approve to add the requester to the space as a member, or deny to reject the request. Get the requestId from naumu_admission_status's pending list, and confirm the decision with the user before calling since approving grants access.",
2263
- inputSchema: z49.object({
2264
- graphId: z49.string().describe("The space (graph) ID the request is for. You must be a member of this space."),
2265
- requestId: z49.string().describe("The pending join request ID, taken from naumu_admission_status."),
2266
- action: z49.enum(["approve", "deny"]).describe("approve adds the requester as a member; deny rejects the request.")
2416
+ inputSchema: z51.object({
2417
+ graphId: z51.string().describe("The space (graph) ID the request is for. You must be a member of this space."),
2418
+ requestId: z51.string().describe("The pending join request ID, taken from naumu_admission_status."),
2419
+ action: z51.enum(["approve", "deny"]).describe("approve adds the requester as a member; deny rejects the request.")
2267
2420
  })
2268
2421
  },
2269
2422
  async ({ graphId, requestId, action }) => {
@@ -2313,9 +2466,16 @@ var TOOL_REGISTRARS = {
2313
2466
  naumu_whoami: registerWhoami,
2314
2467
  naumu_list_threads: registerListThreads,
2315
2468
  naumu_list_topics: registerListTopics,
2469
+ // User-surface only. `POST /api/graphs/:id/topics` requires the ADMIN-only
2470
+ // `space:manage-topics` permission, and bot identities always resolve to the
2471
+ // editor role, so a bot calling this could only ever 403. It is therefore
2472
+ // omitted from BOT_ONLY_TOOL_NAMES and has no entry in the backend
2473
+ // PERMISSION_TO_MCP_TOOLS map (same treatment as the admission tools below).
2474
+ naumu_create_topic: registerCreateTopic,
2316
2475
  naumu_get_thread: registerGetThread,
2317
2476
  naumu_create_thread: registerCreateThread,
2318
2477
  naumu_request_attachment_upload: registerRequestAttachmentUpload,
2478
+ naumu_persist_canvas_attachment: registerPersistCanvasAttachment,
2319
2479
  naumu_add_reaction: registerAddReaction,
2320
2480
  naumu_remove_reaction: registerRemoveReaction,
2321
2481
  naumu_typing: registerNaumuTyping,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naumu/mcp",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "MCP server for Naumu – access your knowledge graph from Claude Code, Cursor, and other AI coding agents",
5
5
  "license": "MIT",
6
6
  "author": "Naumu <hello@naumu.ai>",