@naumu/mcp 0.12.0 → 0.13.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.
- package/dist/index.js +268 -169
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ function safeErrorMessage(status, upstream) {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
// ../mcp-core/src/version.ts
|
|
33
|
-
var NAUMU_MCP_VERSION = "0.
|
|
33
|
+
var NAUMU_MCP_VERSION = "0.13.0";
|
|
34
34
|
|
|
35
35
|
// ../mcp-core/src/client.ts
|
|
36
36
|
var HEADER_VALUE_MAX_LENGTH = 100;
|
|
@@ -198,7 +198,7 @@ var NaumuClient = class {
|
|
|
198
198
|
// ../mcp-core/src/instructions.ts
|
|
199
199
|
var NAUMU_INSTRUCTIONS = `The Naumu MCP server gives structured access to Naumu knowledge graphs (also called spaces). Prefer these tools over WebFetch whenever the user mentions a naumu.ai URL \u2014 Naumu pages are client-rendered React, so WebFetch returns an empty shell with no data.
|
|
200
200
|
|
|
201
|
-
Getting information about a space: use naumu_ask. It puts your question to the @Naumu agent (which has full read access and inspects the graph for you) and returns a synthesised, node-grounded answer with the exact source node ids and a confidence hint, in a single call. It is the authoritative answer for what is in a space, what is new or recently changed, how something works, or any summary - present it and its sources directly. Do NOT then re-read the graph yourself with naumu_get_schema, naumu_filter, naumu_get_node or fetch to verify or sanity-check the answer: that repeats work naumu_ask already did and is dramatically slower (it can turn a 40-second answer into minutes). Trust the answer and its cited sources. Reach for a granular read only to fetch one specific node the answer pointed to, or for a need naumu_ask genuinely cannot serve (naumu_search to locate nodes by meaning, naumu_list_threads + naumu_read_thread for conversation history). Recording the question and answer as a visible conversation in the space is expected and useful, so do not avoid naumu_ask to prevent creating a thread. To hand @Naumu work to carry out in the background (add knowledge, make changes, record a status update), use naumu_delegate.
|
|
201
|
+
Getting information about a space: use naumu_ask. It puts your question to the @Naumu agent (which has full read access and inspects the graph for you) and returns a synthesised, node-grounded answer with the exact source node ids and a confidence hint, in a single call. It is the authoritative answer for what is in a space, what is new or recently changed, how something works, or any summary - present it and its sources directly. Do NOT then re-read the graph yourself with naumu_get_schema, naumu_filter, naumu_get_node or fetch to verify or sanity-check the answer: that repeats work naumu_ask already did and is dramatically slower (it can turn a 40-second answer into minutes). Trust the answer and its cited sources. Reach for a granular read only to fetch one specific node the answer pointed to, or for a need naumu_ask genuinely cannot serve (naumu_search to locate nodes by meaning, naumu_list_threads + naumu_read_thread for conversation history). To wait for the next reply in a thread, use naumu_wait_for_activity instead of re-reading it on a timer - it blocks server-side until a new message lands. Recording the question and answer as a visible conversation in the space is expected and useful, so do not avoid naumu_ask to prevent creating a thread. To hand @Naumu work to carry out in the background (add knowledge, make changes, record a status update), use naumu_delegate.
|
|
202
202
|
|
|
203
203
|
IMPORTANT: graphId is a UUID (e.g. "0464cbfa-60ca-41b3-ac8f-bbeb8243a193"). The value in the URL right after /spaces/ is a slug (e.g. "naumu-0464cbfa"), NOT the graphId. You must resolve the slug to a graphId first.
|
|
204
204
|
|
|
@@ -1171,15 +1171,16 @@ function registerPostMessage(server2, client2) {
|
|
|
1171
1171
|
idempotentHint: false,
|
|
1172
1172
|
openWorldHint: false
|
|
1173
1173
|
},
|
|
1174
|
-
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).
|
|
1174
|
+
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). A text @-mention renders as a pill but does NOT notify or add a non-participant \u2014 to loop a person in so they get notified, use naumu_add_participants after posting. 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. By default this only appends text: @Naumu is NOT summoned unless the thread auto-responds or you mention it, so nothing is committed to the graph. Pass `invokeAgent: true` when you need @Naumu to act on the message (record a work-log entry, file a status update); it summons @Naumu unconditionally, even in paused threads, and @Naumu works in the background - poll naumu_read_thread to see what it did. To get a synthesised answer from @Naumu, use naumu_ask.',
|
|
1175
1175
|
inputSchema: z20.object({
|
|
1176
1176
|
threadId: z20.string().describe("The thread ID to post into. You must be a participant in this thread."),
|
|
1177
1177
|
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.'),
|
|
1178
1178
|
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 } }`.'),
|
|
1179
|
-
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.")
|
|
1179
|
+
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."),
|
|
1180
|
+
invokeAgent: z20.boolean().optional().describe("Set true to summon @Naumu on this message unconditionally (mention-equivalent), even in threads where auto-response is paused. Required whenever the post must be committed to the graph (work-log entries, status updates). @Naumu processes in the background; poll naumu_read_thread. Defaults to false: plain append, no agent turn.")
|
|
1180
1181
|
})
|
|
1181
1182
|
},
|
|
1182
|
-
async ({ threadId, content, contentFormat, attachmentIds }) => {
|
|
1183
|
+
async ({ threadId, content, contentFormat, attachmentIds, invokeAgent }) => {
|
|
1183
1184
|
try {
|
|
1184
1185
|
const body = {
|
|
1185
1186
|
// 'markdown' is the announced name for the API's 'text' mode;
|
|
@@ -1188,6 +1189,10 @@ function registerPostMessage(server2, client2) {
|
|
|
1188
1189
|
};
|
|
1189
1190
|
if (content !== void 0) body.content = content;
|
|
1190
1191
|
if (attachmentIds && attachmentIds.length > 0) body.attachmentIds = attachmentIds;
|
|
1192
|
+
if (invokeAgent === true) {
|
|
1193
|
+
body.invokeAgent = true;
|
|
1194
|
+
body.async = true;
|
|
1195
|
+
}
|
|
1191
1196
|
const data = await client2.post(`/api/threads/${threadId}/messages`, body);
|
|
1192
1197
|
return {
|
|
1193
1198
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
@@ -1203,25 +1208,69 @@ function registerPostMessage(server2, client2) {
|
|
|
1203
1208
|
);
|
|
1204
1209
|
}
|
|
1205
1210
|
|
|
1206
|
-
// ../mcp-core/src/tools/
|
|
1211
|
+
// ../mcp-core/src/tools/add-participants.ts
|
|
1207
1212
|
import { z as z21 } from "zod";
|
|
1213
|
+
function registerAddParticipants(server2, client2) {
|
|
1214
|
+
server2.registerTool(
|
|
1215
|
+
"naumu_add_participants",
|
|
1216
|
+
{
|
|
1217
|
+
title: "Add Participants",
|
|
1218
|
+
annotations: { readOnlyHint: false, destructiveHint: false, openWorldHint: false },
|
|
1219
|
+
description: 'Add space members to a Naumu thread as participants. This is how you loop someone into a conversation so they actually get notified: each newly added person gets an "added you to this thread" notification and a "has joined the conversation" system note, and the thread lands in their inbox. Text @-mentions in naumu_post_message do NOT notify or add non-participants \u2014 after posting a handoff or a message addressed to someone, add them here. Pass userIds (UUIDs) from naumu_list_members or naumu_get_thread participantDetails; emails are not accepted. Adding is idempotent \u2014 already-present participants are skipped silently.',
|
|
1220
|
+
inputSchema: z21.object({
|
|
1221
|
+
threadId: z21.string().describe("The thread ID to add participants to. You must be able to manage this thread."),
|
|
1222
|
+
userIds: z21.array(z21.string()).min(1).max(25).describe("User ids (UUIDs) of space members to add, from naumu_list_members or naumu_get_thread."),
|
|
1223
|
+
role: z21.enum(["editor", "viewer"]).optional().describe("Thread role for the added participants. Defaults to editor (can post); viewer is read-only.")
|
|
1224
|
+
})
|
|
1225
|
+
},
|
|
1226
|
+
async ({ threadId, userIds, role }) => {
|
|
1227
|
+
try {
|
|
1228
|
+
const data = await client2.patch(`/api/threads/${threadId}`, {
|
|
1229
|
+
addParticipants: userIds.map((userId) => ({ userId, role: role ?? "editor" }))
|
|
1230
|
+
});
|
|
1231
|
+
const participants = data?.participantDetails ?? data?.participantEmails ?? data;
|
|
1232
|
+
return {
|
|
1233
|
+
content: [
|
|
1234
|
+
{
|
|
1235
|
+
type: "text",
|
|
1236
|
+
text: JSON.stringify({ threadId, participants }, null, 2)
|
|
1237
|
+
}
|
|
1238
|
+
]
|
|
1239
|
+
};
|
|
1240
|
+
} catch (err) {
|
|
1241
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
1242
|
+
return {
|
|
1243
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
1244
|
+
isError: true
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
);
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
// ../mcp-core/src/tools/read-thread.ts
|
|
1252
|
+
import { z as z22 } from "zod";
|
|
1208
1253
|
function registerReadThread(server2, client2) {
|
|
1209
1254
|
server2.registerTool(
|
|
1210
1255
|
"naumu_read_thread",
|
|
1211
1256
|
{
|
|
1212
1257
|
title: "Read Thread",
|
|
1213
1258
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
1214
|
-
description: 'Read messages from a Naumu thread. Returns paginated history ordered newest-first
|
|
1215
|
-
inputSchema:
|
|
1216
|
-
threadId:
|
|
1217
|
-
before:
|
|
1218
|
-
|
|
1259
|
+
description: 'Read messages from a Naumu thread. Returns paginated history ordered newest-first, or oldest-first when you pass `after`; each message carries a `status` (`processing` while @Naumu is still composing, `complete` when done). Use this to pick up an answer after naumu_ask returns status "processing", or to read what naumu_delegate produced. Use `before` (timestamp ms) to page further back, or `after` (timestamp ms) to catch up on what arrived since you last looked. To wait for the next message instead of re-reading on a timer, use naumu_wait_for_activity. Default page size 50, max 200. To read or download a message attachment, pass its `attachments[].id` to naumu_get_attachment.',
|
|
1260
|
+
inputSchema: z22.object({
|
|
1261
|
+
threadId: z22.string().describe("The thread ID to read from."),
|
|
1262
|
+
before: z22.number().optional().describe("Unix timestamp in milliseconds. Returns messages strictly older than this. Omit for the newest page."),
|
|
1263
|
+
after: z22.number().optional().describe("Unix timestamp in milliseconds. Returns only messages newer than this, oldest-first. Mutually exclusive with `before`."),
|
|
1264
|
+
afterId: z22.string().optional().describe("Message id that goes with `after` - the `latestId` from naumu_wait_for_activity. Only meaningful alongside `after`. With it, messages sharing the `after` millisecond are compared by id instead of being skipped."),
|
|
1265
|
+
limit: z22.number().int().min(1).max(200).optional().describe("Page size, default 50, max 200.")
|
|
1219
1266
|
})
|
|
1220
1267
|
},
|
|
1221
|
-
async ({ threadId, before, limit }) => {
|
|
1268
|
+
async ({ threadId, before, after, afterId, limit }) => {
|
|
1222
1269
|
try {
|
|
1223
1270
|
const params = new URLSearchParams();
|
|
1224
1271
|
if (before !== void 0) params.set("before", String(before));
|
|
1272
|
+
if (after !== void 0) params.set("after", String(after));
|
|
1273
|
+
if (afterId !== void 0) params.set("afterId", afterId);
|
|
1225
1274
|
if (limit !== void 0) params.set("limit", String(limit));
|
|
1226
1275
|
const qs = params.toString();
|
|
1227
1276
|
const path = `/api/threads/${threadId}/messages${qs ? `?${qs}` : ""}`;
|
|
@@ -1240,8 +1289,56 @@ function registerReadThread(server2, client2) {
|
|
|
1240
1289
|
);
|
|
1241
1290
|
}
|
|
1242
1291
|
|
|
1292
|
+
// ../mcp-core/src/tools/wait-for-activity.ts
|
|
1293
|
+
import { z as z23 } from "zod";
|
|
1294
|
+
function registerWaitForActivity(server2, client2) {
|
|
1295
|
+
server2.registerTool(
|
|
1296
|
+
"naumu_wait_for_activity",
|
|
1297
|
+
{
|
|
1298
|
+
title: "Wait For Thread Activity",
|
|
1299
|
+
// Pure long-poll read: parks on the server and returns messages, never
|
|
1300
|
+
// writes. Repeating the same `after` returns the same messages.
|
|
1301
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1302
|
+
description: 'Wait for the next messages in a Naumu thread. The call blocks for up to `timeoutSec` seconds server-side and returns the moment something new arrives, so this is the cheap way to attend a thread - use it instead of calling naumu_read_thread on a timer.\n\nReturns `{ messages, latest, latestId, timedOut }`. `messages` is oldest-first and each one carries `senderKind`: "self" (you), "user" (a human), "agent" (a bot or @Naumu), "system" (a system notice). Reply only to "user" messages unless your task says otherwise; ignore "agent" and "system" ones.\n\nTo keep attending, loop: call again with `after` = the `latest` you just received AND `afterId` = the `latestId`. Passing both is what stops two messages written in the same millisecond from being lost. Never reuse the old cursor after receiving messages - you will get the same ones back. If `timedOut` is true and `messages` is empty, nothing happened: call again with the same cursor.\n\nIf a returned message has `status: "processing"`, the reply is still being written - it is a placeholder that gets UPDATED in place, so waiting again will never show you the final text. Re-read that message with naumu_read_thread instead (pass `after` = its timestamp minus 1, or page back to it) until its status is `complete`.\n\nGet your first `after`/`afterId` from the newest message in naumu_read_thread. Before composing a reply call naumu_typing, then post it with naumu_post_message.',
|
|
1303
|
+
inputSchema: z23.object({
|
|
1304
|
+
threadId: z23.string().describe("The thread ID to wait on. You must be a participant."),
|
|
1305
|
+
after: z23.number().describe(
|
|
1306
|
+
"Unix timestamp in milliseconds. Only messages newer than this count. Use the `latest` value from the previous call, or the newest message timestamp from naumu_read_thread."
|
|
1307
|
+
),
|
|
1308
|
+
afterId: z23.string().optional().describe(
|
|
1309
|
+
"Message id that goes with `after` - the `latestId` from the previous call. Only meaningful alongside `after`. With it, messages sharing the `after` millisecond are compared by id instead of being skipped, so nothing written in the same millisecond is lost."
|
|
1310
|
+
),
|
|
1311
|
+
timeoutSec: z23.number().int().min(1).max(25).default(20).describe("Seconds to block before returning empty, 1 to 25, default 20."),
|
|
1312
|
+
excludeSelf: z23.boolean().default(true).describe(
|
|
1313
|
+
'Ignore your own messages (senderKind "self") when deciding whether something new arrived. Default true - keep it on so your own reply does not end the next wait immediately.'
|
|
1314
|
+
)
|
|
1315
|
+
})
|
|
1316
|
+
},
|
|
1317
|
+
async ({ threadId, after, afterId, timeoutSec, excludeSelf }) => {
|
|
1318
|
+
try {
|
|
1319
|
+
const params = new URLSearchParams();
|
|
1320
|
+
params.set("after", String(after));
|
|
1321
|
+
if (afterId !== void 0) params.set("afterId", afterId);
|
|
1322
|
+
if (timeoutSec !== void 0) params.set("timeoutSec", String(timeoutSec));
|
|
1323
|
+
if (excludeSelf !== void 0) params.set("excludeSelf", String(excludeSelf));
|
|
1324
|
+
const path = `/api/threads/${threadId}/messages/wait?${params.toString()}`;
|
|
1325
|
+
const data = await client2.get(path);
|
|
1326
|
+
return {
|
|
1327
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
1328
|
+
};
|
|
1329
|
+
} catch (err) {
|
|
1330
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
1331
|
+
return {
|
|
1332
|
+
content: [{ type: "text", text: `Error: ${message}` }],
|
|
1333
|
+
isError: true
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1243
1340
|
// ../mcp-core/src/tools/whoami.ts
|
|
1244
|
-
import { z as
|
|
1341
|
+
import { z as z24 } from "zod";
|
|
1245
1342
|
function registerWhoami(server2, client2) {
|
|
1246
1343
|
server2.registerTool(
|
|
1247
1344
|
"naumu_whoami",
|
|
@@ -1249,7 +1346,7 @@ function registerWhoami(server2, client2) {
|
|
|
1249
1346
|
title: "Who Am I",
|
|
1250
1347
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
1251
1348
|
description: 'Return who the calling key is, so you can bootstrap before the first real operation. A bot identity key returns its Identity row (id, graphId, name, instructions, allowedTools) plus its curated MCP tool manifest. A user API key returns `kind: "user"` with userId, name, and email - a person spans many graphs, so resolve a specific graph via naumu_list_graphs. The live tool list is already available from tools/list, so it is not repeated here. No arguments. Always available regardless of the permission grid.',
|
|
1252
|
-
inputSchema:
|
|
1349
|
+
inputSchema: z24.object({})
|
|
1253
1350
|
},
|
|
1254
1351
|
async () => {
|
|
1255
1352
|
try {
|
|
@@ -1269,7 +1366,7 @@ function registerWhoami(server2, client2) {
|
|
|
1269
1366
|
}
|
|
1270
1367
|
|
|
1271
1368
|
// ../mcp-core/src/tools/list-threads.ts
|
|
1272
|
-
import { z as
|
|
1369
|
+
import { z as z25 } from "zod";
|
|
1273
1370
|
function sanitizeThreadParticipants(thread) {
|
|
1274
1371
|
if (!thread || typeof thread !== "object" || !("participantEmails" in thread)) {
|
|
1275
1372
|
return thread;
|
|
@@ -1284,11 +1381,11 @@ function registerListThreads(server2, client2) {
|
|
|
1284
1381
|
title: "List Threads",
|
|
1285
1382
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
1286
1383
|
description: "List threads sorted by last activity (newest first), for self-discovery before deciding which to engage. With a user API key, pass `graphId` to list threads you can see in that space (resolve it via naumu_list_graphs). Pass `nodeId` alongside `graphId` to list only the conversations tied to that node (attached, or that created/modified it). With a bot identity key, omit `graphId` to list threads in your own graph \u2014 each row carries an `isParticipant` flag (TRUE means you were explicitly invited and your replies fan out via webhook). Page back with `cursor` set to the oldest `lastActivityAt` from the previous page.",
|
|
1287
|
-
inputSchema:
|
|
1288
|
-
graphId:
|
|
1289
|
-
nodeId:
|
|
1290
|
-
cursor:
|
|
1291
|
-
limit:
|
|
1384
|
+
inputSchema: z25.object({
|
|
1385
|
+
graphId: z25.string().optional().describe("Graph (space) ID. Required for user API keys; omit for bot identity keys (defaults to your own graph)."),
|
|
1386
|
+
nodeId: z25.string().optional().describe("Scope the listing to conversations tied to this node. Requires `graphId`."),
|
|
1387
|
+
cursor: z25.number().int().optional().describe("Unix timestamp ms \u2014 returns threads with `lastActivityAt` strictly older than this. Omit for the newest page."),
|
|
1388
|
+
limit: z25.number().int().min(1).max(200).optional().describe("Page size, default 50, max 200.")
|
|
1292
1389
|
})
|
|
1293
1390
|
},
|
|
1294
1391
|
async ({ graphId, nodeId, cursor, limit }) => {
|
|
@@ -1339,7 +1436,7 @@ function registerListThreads(server2, client2) {
|
|
|
1339
1436
|
}
|
|
1340
1437
|
|
|
1341
1438
|
// ../mcp-core/src/tools/list-topics.ts
|
|
1342
|
-
import { z as
|
|
1439
|
+
import { z as z26 } from "zod";
|
|
1343
1440
|
function toFilingDestination(topic) {
|
|
1344
1441
|
if (!topic || typeof topic !== "object") return null;
|
|
1345
1442
|
const t = topic;
|
|
@@ -1360,8 +1457,8 @@ function registerListTopics(server2, client2) {
|
|
|
1360
1457
|
title: "List Topics",
|
|
1361
1458
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
1362
1459
|
description: "List a space's real topics \u2014 the filing destinations you can hand to the `topicIds` param of naumu_delegate or naumu_ask when creating a thread. Filing a new thread into one or more topics makes it visible to those topics' members from birth (instead of the default private thread). Each row carries { id, name, visibilityMode, memberCount, openToWeb }; use the id values in `topicIds`. Topics have no separate description field. The virtual #misc bucket is not a real topic and is omitted; archived topics are omitted because they can't be tagged. Resolve `graphId` via naumu_list_graphs first.",
|
|
1363
|
-
inputSchema:
|
|
1364
|
-
graphId:
|
|
1460
|
+
inputSchema: z26.object({
|
|
1461
|
+
graphId: z26.string().describe("The space (graph) id to list topics for.")
|
|
1365
1462
|
})
|
|
1366
1463
|
},
|
|
1367
1464
|
async ({ graphId }) => {
|
|
@@ -1384,7 +1481,7 @@ function registerListTopics(server2, client2) {
|
|
|
1384
1481
|
}
|
|
1385
1482
|
|
|
1386
1483
|
// ../mcp-core/src/tools/create-topic.ts
|
|
1387
|
-
import { z as
|
|
1484
|
+
import { z as z27 } from "zod";
|
|
1388
1485
|
var TOPIC_NAME_PATTERN = /^[a-z0-9-]+$/;
|
|
1389
1486
|
var TOPIC_NAME_MAX_LENGTH = 50;
|
|
1390
1487
|
var RESERVED_TOPIC_NAMES = [
|
|
@@ -1418,18 +1515,18 @@ function registerCreateTopic(server2, client2) {
|
|
|
1418
1515
|
title: "Create Topic",
|
|
1419
1516
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
1420
1517
|
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.',
|
|
1421
|
-
inputSchema:
|
|
1422
|
-
graphId:
|
|
1423
|
-
name:
|
|
1518
|
+
inputSchema: z27.object({
|
|
1519
|
+
graphId: z27.string().describe("The space (graph) id to create the topic in."),
|
|
1520
|
+
name: z27.string().min(1).describe(
|
|
1424
1521
|
'Topic name in channel-slug form: lowercase letters, numbers and "-" only, max 50 chars, not a reserved name. Unique per space (case-insensitive).'
|
|
1425
1522
|
),
|
|
1426
|
-
color:
|
|
1427
|
-
visibilityMode:
|
|
1523
|
+
color: z27.string().optional().describe("Optional named color token for the topic badge. Omit unless the user asked for a specific color."),
|
|
1524
|
+
visibilityMode: z27.enum(["default", "open", "closed"]).optional().describe(
|
|
1428
1525
|
'Who can see and join the topic. "open" (the default) lets any space member join, "default" is the space default, "closed" is invite-only.'
|
|
1429
1526
|
),
|
|
1430
|
-
openToWeb:
|
|
1431
|
-
webParticipation:
|
|
1432
|
-
memberIds:
|
|
1527
|
+
openToWeb: z27.boolean().optional().describe('Expose the topic publicly on the web. Invalid together with visibilityMode "closed".'),
|
|
1528
|
+
webParticipation: z27.enum(["participate", "view-only"]).optional().describe('What public web visitors may do when openToWeb is true. Defaults to "view-only".'),
|
|
1529
|
+
memberIds: z27.array(z27.string()).optional().describe(
|
|
1433
1530
|
"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."
|
|
1434
1531
|
)
|
|
1435
1532
|
})
|
|
@@ -1482,7 +1579,7 @@ function registerCreateTopic(server2, client2) {
|
|
|
1482
1579
|
}
|
|
1483
1580
|
|
|
1484
1581
|
// ../mcp-core/src/tools/get-thread.ts
|
|
1485
|
-
import { z as
|
|
1582
|
+
import { z as z28 } from "zod";
|
|
1486
1583
|
function sanitizeThreadParticipants2(thread) {
|
|
1487
1584
|
if (!thread || typeof thread !== "object" || !("participantEmails" in thread)) {
|
|
1488
1585
|
return thread;
|
|
@@ -1497,8 +1594,8 @@ function registerGetThread(server2, client2) {
|
|
|
1497
1594
|
title: "Get Thread",
|
|
1498
1595
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
1499
1596
|
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.",
|
|
1500
|
-
inputSchema:
|
|
1501
|
-
threadId:
|
|
1597
|
+
inputSchema: z28.object({
|
|
1598
|
+
threadId: z28.string().describe("The thread ID to fetch.")
|
|
1502
1599
|
})
|
|
1503
1600
|
},
|
|
1504
1601
|
async ({ threadId }) => {
|
|
@@ -1520,7 +1617,7 @@ function registerGetThread(server2, client2) {
|
|
|
1520
1617
|
}
|
|
1521
1618
|
|
|
1522
1619
|
// ../mcp-core/src/tools/create-thread.ts
|
|
1523
|
-
import { z as
|
|
1620
|
+
import { z as z29 } from "zod";
|
|
1524
1621
|
function registerCreateThread(server2, client2) {
|
|
1525
1622
|
server2.registerTool(
|
|
1526
1623
|
"naumu_create_thread",
|
|
@@ -1535,23 +1632,23 @@ function registerCreateThread(server2, client2) {
|
|
|
1535
1632
|
openWorldHint: false
|
|
1536
1633
|
},
|
|
1537
1634
|
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.",
|
|
1538
|
-
inputSchema:
|
|
1539
|
-
title:
|
|
1540
|
-
participants:
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
type:
|
|
1544
|
-
userId:
|
|
1635
|
+
inputSchema: z29.object({
|
|
1636
|
+
title: z29.string().min(1).max(200).optional().describe('Thread title shown in the sidebar. If omitted, Naumu generates a default like "Conversation YYYY-MM-DD".'),
|
|
1637
|
+
participants: z29.array(
|
|
1638
|
+
z29.discriminatedUnion("type", [
|
|
1639
|
+
z29.object({
|
|
1640
|
+
type: z29.literal("user"),
|
|
1641
|
+
userId: z29.string().min(1).describe("User UUID \u2014 get these from `naumu_get_thread`/`naumu_read_thread` participant rosters or webhook payloads.")
|
|
1545
1642
|
}),
|
|
1546
|
-
|
|
1547
|
-
type:
|
|
1548
|
-
identityId:
|
|
1643
|
+
z29.object({
|
|
1644
|
+
type: z29.literal("identity"),
|
|
1645
|
+
identityId: z29.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.")
|
|
1549
1646
|
})
|
|
1550
1647
|
])
|
|
1551
1648
|
).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."),
|
|
1552
|
-
initialMessage:
|
|
1553
|
-
visibility:
|
|
1554
|
-
topicIds:
|
|
1649
|
+
initialMessage: z29.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."),
|
|
1650
|
+
visibility: z29.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."),
|
|
1651
|
+
topicIds: z29.array(z29.string()).max(8).optional().describe(
|
|
1555
1652
|
"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."
|
|
1556
1653
|
)
|
|
1557
1654
|
})
|
|
@@ -1580,7 +1677,7 @@ function registerCreateThread(server2, client2) {
|
|
|
1580
1677
|
}
|
|
1581
1678
|
|
|
1582
1679
|
// ../mcp-core/src/tools/request-attachment-upload.ts
|
|
1583
|
-
import { z as
|
|
1680
|
+
import { z as z30 } from "zod";
|
|
1584
1681
|
function registerRequestAttachmentUpload(server2, client2) {
|
|
1585
1682
|
server2.registerTool(
|
|
1586
1683
|
"naumu_request_attachment_upload",
|
|
@@ -1588,15 +1685,15 @@ function registerRequestAttachmentUpload(server2, client2) {
|
|
|
1588
1685
|
title: "Request Attachment Upload",
|
|
1589
1686
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
1590
1687
|
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 `` 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.",
|
|
1591
|
-
inputSchema:
|
|
1592
|
-
graphId:
|
|
1593
|
-
threadId:
|
|
1594
|
-
noteId:
|
|
1595
|
-
canvasId:
|
|
1596
|
-
fileName:
|
|
1597
|
-
fileType:
|
|
1598
|
-
fileSize:
|
|
1599
|
-
audioDurationSec:
|
|
1688
|
+
inputSchema: z30.object({
|
|
1689
|
+
graphId: z30.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."),
|
|
1690
|
+
threadId: z30.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."),
|
|
1691
|
+
noteId: z30.string().optional().describe("Destination note (Thought) - presign for a note when the upload will be embedded via `` 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."),
|
|
1692
|
+
canvasId: z30.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."),
|
|
1693
|
+
fileName: z30.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."),
|
|
1694
|
+
fileType: z30.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."),
|
|
1695
|
+
fileSize: z30.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."),
|
|
1696
|
+
audioDurationSec: z30.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.")
|
|
1600
1697
|
}).refine(
|
|
1601
1698
|
(data) => [data.threadId, data.noteId, data.canvasId].filter((v) => v !== void 0).length === 1,
|
|
1602
1699
|
{ message: "Exactly one of threadId, noteId, or canvasId is required - pick the single destination this upload is for." }
|
|
@@ -1644,7 +1741,7 @@ function registerRequestAttachmentUpload(server2, client2) {
|
|
|
1644
1741
|
}
|
|
1645
1742
|
|
|
1646
1743
|
// ../mcp-core/src/tools/persist-canvas-attachment.ts
|
|
1647
|
-
import { z as
|
|
1744
|
+
import { z as z31 } from "zod";
|
|
1648
1745
|
function registerPersistCanvasAttachment(server2, client2) {
|
|
1649
1746
|
server2.registerTool(
|
|
1650
1747
|
"naumu_persist_canvas_attachment",
|
|
@@ -1652,8 +1749,8 @@ function registerPersistCanvasAttachment(server2, client2) {
|
|
|
1652
1749
|
title: "Persist Canvas Attachment",
|
|
1653
1750
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1654
1751
|
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.",
|
|
1655
|
-
inputSchema:
|
|
1656
|
-
attachmentId:
|
|
1752
|
+
inputSchema: z31.object({
|
|
1753
|
+
attachmentId: z31.string().min(1).describe("The `attachmentId` returned by `naumu_request_attachment_upload` for this canvas.")
|
|
1657
1754
|
})
|
|
1658
1755
|
},
|
|
1659
1756
|
async ({ attachmentId }) => {
|
|
@@ -1674,7 +1771,7 @@ function registerPersistCanvasAttachment(server2, client2) {
|
|
|
1674
1771
|
}
|
|
1675
1772
|
|
|
1676
1773
|
// ../mcp-core/src/tools/get-attachment.ts
|
|
1677
|
-
import { z as
|
|
1774
|
+
import { z as z32 } from "zod";
|
|
1678
1775
|
var DOWNLOAD_URL_TTL_SECONDS = 900;
|
|
1679
1776
|
var MAX_INLINE_PREVIEW_BYTES = 4 * 1024 * 1024;
|
|
1680
1777
|
function normalizeAttachmentId(input) {
|
|
@@ -1695,8 +1792,8 @@ function registerGetAttachment(server2, client2) {
|
|
|
1695
1792
|
title: "Get Attachment",
|
|
1696
1793
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
1697
1794
|
description: "Read a chat attachment. Pass the `attachmentId` from a message's `attachments[].id` in naumu_read_thread (its `url` field works too - the id is extracted from it), and this resolves it into a short-lived download URL for the actual bytes.\n\nReturns a JSON text block with `{ attachmentId, downloadUrl, expiresInSeconds, note }`. Use `downloadUrl` EXACTLY as given:\n\u2022 GET it with no Authorization header - the URL itself is the auth, and adding one makes S3 answer 403.\n\u2022 It expires about 15 minutes after this call. Fetch it now; re-call this tool for a fresh URL rather than holding one.\n\u2022 Do not log it, quote it back to the user, or store it - it is a bearer capability for its whole lifetime.\n\nWhen the attachment is an image (or a video or PDF that has a generated poster), a downsized preview is also returned inline as an image block, so a visual attachment can often be understood without fetching anything. The preview is a thumbnail, not the original - fetch `downloadUrl` when you need full resolution or the exact file.\n\nAccess is checked the same way it is for a person: you only resolve attachments in threads you can already read.",
|
|
1698
|
-
inputSchema:
|
|
1699
|
-
attachmentId:
|
|
1795
|
+
inputSchema: z32.object({
|
|
1796
|
+
attachmentId: z32.string().min(1).describe("Attachment id, from `attachments[].id` on a message returned by naumu_read_thread. A full or relative download URL is also accepted - the id is extracted from its last path segment.")
|
|
1700
1797
|
})
|
|
1701
1798
|
},
|
|
1702
1799
|
async ({ attachmentId }) => {
|
|
@@ -1746,7 +1843,7 @@ function registerGetAttachment(server2, client2) {
|
|
|
1746
1843
|
}
|
|
1747
1844
|
|
|
1748
1845
|
// ../mcp-core/src/tools/add-reaction.ts
|
|
1749
|
-
import { z as
|
|
1846
|
+
import { z as z33 } from "zod";
|
|
1750
1847
|
function registerAddReaction(server2, client2) {
|
|
1751
1848
|
server2.registerTool(
|
|
1752
1849
|
"naumu_add_reaction",
|
|
@@ -1754,10 +1851,10 @@ function registerAddReaction(server2, client2) {
|
|
|
1754
1851
|
title: "Add Reaction",
|
|
1755
1852
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1756
1853
|
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.',
|
|
1757
|
-
inputSchema:
|
|
1758
|
-
threadId:
|
|
1759
|
-
messageId:
|
|
1760
|
-
emoji:
|
|
1854
|
+
inputSchema: z33.object({
|
|
1855
|
+
threadId: z33.string().describe("Thread containing the message. You must be a participant."),
|
|
1856
|
+
messageId: z33.string().describe("The message to react to."),
|
|
1857
|
+
emoji: z33.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.')
|
|
1761
1858
|
})
|
|
1762
1859
|
},
|
|
1763
1860
|
async ({ threadId, messageId, emoji }) => {
|
|
@@ -1781,7 +1878,7 @@ function registerAddReaction(server2, client2) {
|
|
|
1781
1878
|
}
|
|
1782
1879
|
|
|
1783
1880
|
// ../mcp-core/src/tools/remove-reaction.ts
|
|
1784
|
-
import { z as
|
|
1881
|
+
import { z as z34 } from "zod";
|
|
1785
1882
|
function registerRemoveReaction(server2, client2) {
|
|
1786
1883
|
server2.registerTool(
|
|
1787
1884
|
"naumu_remove_reaction",
|
|
@@ -1789,10 +1886,10 @@ function registerRemoveReaction(server2, client2) {
|
|
|
1789
1886
|
title: "Remove Reaction",
|
|
1790
1887
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1791
1888
|
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.",
|
|
1792
|
-
inputSchema:
|
|
1793
|
-
threadId:
|
|
1794
|
-
messageId:
|
|
1795
|
-
emoji:
|
|
1889
|
+
inputSchema: z34.object({
|
|
1890
|
+
threadId: z34.string().describe("Thread containing the message. You must be a participant."),
|
|
1891
|
+
messageId: z34.string().describe("The message to remove your reaction from."),
|
|
1892
|
+
emoji: z34.string().min(1).describe("Emoji character to remove (must match what you originally reacted with).")
|
|
1796
1893
|
})
|
|
1797
1894
|
},
|
|
1798
1895
|
async ({ threadId, messageId, emoji }) => {
|
|
@@ -1816,7 +1913,7 @@ function registerRemoveReaction(server2, client2) {
|
|
|
1816
1913
|
}
|
|
1817
1914
|
|
|
1818
1915
|
// ../mcp-core/src/tools/naumu-typing.ts
|
|
1819
|
-
import { z as
|
|
1916
|
+
import { z as z35 } from "zod";
|
|
1820
1917
|
function registerNaumuTyping(server2, client2) {
|
|
1821
1918
|
server2.registerTool(
|
|
1822
1919
|
"naumu_typing",
|
|
@@ -1827,9 +1924,9 @@ function registerNaumuTyping(server2, client2) {
|
|
|
1827
1924
|
// repeating the same state is a no-op renew, so idempotent.
|
|
1828
1925
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
1829
1926
|
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.',
|
|
1830
|
-
inputSchema:
|
|
1831
|
-
threadId:
|
|
1832
|
-
state:
|
|
1927
|
+
inputSchema: z35.object({
|
|
1928
|
+
threadId: z35.string().describe("The thread ID to set typing in. You must be a participant."),
|
|
1929
|
+
state: z35.enum(["start", "stop"]).describe('"start" acquires/renews the lease; "stop" ends it and clears the pill immediately.')
|
|
1833
1930
|
})
|
|
1834
1931
|
},
|
|
1835
1932
|
async ({ threadId, state }) => {
|
|
@@ -1850,7 +1947,7 @@ function registerNaumuTyping(server2, client2) {
|
|
|
1850
1947
|
}
|
|
1851
1948
|
|
|
1852
1949
|
// ../mcp-core/src/tools/note-read.ts
|
|
1853
|
-
import { z as
|
|
1950
|
+
import { z as z36 } from "zod";
|
|
1854
1951
|
function registerNoteRead(server2, client2) {
|
|
1855
1952
|
server2.registerTool(
|
|
1856
1953
|
"naumu_note_read",
|
|
@@ -1858,8 +1955,8 @@ function registerNoteRead(server2, client2) {
|
|
|
1858
1955
|
title: "Read Note",
|
|
1859
1956
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
1860
1957
|
description: "Read the current contents of a note as markdown, with its title and `connections` (the graph nodes the note is tied to); 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.",
|
|
1861
|
-
inputSchema:
|
|
1862
|
-
noteId:
|
|
1958
|
+
inputSchema: z36.object({
|
|
1959
|
+
noteId: z36.string().describe("The note (Thought) ID")
|
|
1863
1960
|
})
|
|
1864
1961
|
},
|
|
1865
1962
|
async ({ noteId }) => {
|
|
@@ -1872,7 +1969,7 @@ function registerNoteRead(server2, client2) {
|
|
|
1872
1969
|
}
|
|
1873
1970
|
|
|
1874
1971
|
// ../mcp-core/src/tools/note-append.ts
|
|
1875
|
-
import { z as
|
|
1972
|
+
import { z as z37 } from "zod";
|
|
1876
1973
|
function registerNoteAppend(server2, client2) {
|
|
1877
1974
|
server2.registerTool(
|
|
1878
1975
|
"naumu_note_append",
|
|
@@ -1880,9 +1977,9 @@ function registerNoteAppend(server2, client2) {
|
|
|
1880
1977
|
title: "Append to Note",
|
|
1881
1978
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
1882
1979
|
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 `` 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.",
|
|
1883
|
-
inputSchema:
|
|
1884
|
-
noteId:
|
|
1885
|
-
markdown:
|
|
1980
|
+
inputSchema: z37.object({
|
|
1981
|
+
noteId: z37.string().describe("The note (Thought) ID to append to"),
|
|
1982
|
+
markdown: z37.string().min(1).describe("Markdown content to append at the end of the note")
|
|
1886
1983
|
})
|
|
1887
1984
|
},
|
|
1888
1985
|
async ({ noteId, markdown }) => {
|
|
@@ -1895,7 +1992,7 @@ function registerNoteAppend(server2, client2) {
|
|
|
1895
1992
|
}
|
|
1896
1993
|
|
|
1897
1994
|
// ../mcp-core/src/tools/note-insert.ts
|
|
1898
|
-
import { z as
|
|
1995
|
+
import { z as z38 } from "zod";
|
|
1899
1996
|
function registerNoteInsert(server2, client2) {
|
|
1900
1997
|
server2.registerTool(
|
|
1901
1998
|
"naumu_note_insert",
|
|
@@ -1903,10 +2000,10 @@ function registerNoteInsert(server2, client2) {
|
|
|
1903
2000
|
title: "Insert After Heading",
|
|
1904
2001
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
1905
2002
|
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 `` 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.",
|
|
1906
|
-
inputSchema:
|
|
1907
|
-
noteId:
|
|
1908
|
-
headingText:
|
|
1909
|
-
markdown:
|
|
2003
|
+
inputSchema: z38.object({
|
|
2004
|
+
noteId: z38.string().describe("The note (Thought) ID"),
|
|
2005
|
+
headingText: z38.string().min(1).describe("Exact text of the heading whose section the new content follows"),
|
|
2006
|
+
markdown: z38.string().min(1).describe("Markdown content to insert at the end of that section")
|
|
1910
2007
|
})
|
|
1911
2008
|
},
|
|
1912
2009
|
async ({ noteId, headingText, markdown }) => {
|
|
@@ -1922,7 +2019,7 @@ function registerNoteInsert(server2, client2) {
|
|
|
1922
2019
|
}
|
|
1923
2020
|
|
|
1924
2021
|
// ../mcp-core/src/tools/note-replace-section.ts
|
|
1925
|
-
import { z as
|
|
2022
|
+
import { z as z39 } from "zod";
|
|
1926
2023
|
function registerNoteReplaceSection(server2, client2) {
|
|
1927
2024
|
server2.registerTool(
|
|
1928
2025
|
"naumu_note_replace_section",
|
|
@@ -1930,11 +2027,11 @@ function registerNoteReplaceSection(server2, client2) {
|
|
|
1930
2027
|
title: "Replace Section",
|
|
1931
2028
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1932
2029
|
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 `` 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.",
|
|
1933
|
-
inputSchema:
|
|
1934
|
-
noteId:
|
|
1935
|
-
headingText:
|
|
1936
|
-
markdown:
|
|
1937
|
-
keepHeading:
|
|
2030
|
+
inputSchema: z39.object({
|
|
2031
|
+
noteId: z39.string().describe("The note (Thought) ID"),
|
|
2032
|
+
headingText: z39.string().min(1).describe("Exact text of the heading anchoring the section"),
|
|
2033
|
+
markdown: z39.string().describe("Replacement markdown for the section body"),
|
|
2034
|
+
keepHeading: z39.boolean().optional().describe("Whether to keep the heading row itself. Default true.")
|
|
1938
2035
|
})
|
|
1939
2036
|
},
|
|
1940
2037
|
async ({ noteId, headingText, markdown, keepHeading }) => {
|
|
@@ -1951,7 +2048,7 @@ function registerNoteReplaceSection(server2, client2) {
|
|
|
1951
2048
|
}
|
|
1952
2049
|
|
|
1953
2050
|
// ../mcp-core/src/tools/note-delete-section.ts
|
|
1954
|
-
import { z as
|
|
2051
|
+
import { z as z40 } from "zod";
|
|
1955
2052
|
function registerNoteDeleteSection(server2, client2) {
|
|
1956
2053
|
server2.registerTool(
|
|
1957
2054
|
"naumu_note_delete_section",
|
|
@@ -1959,9 +2056,9 @@ function registerNoteDeleteSection(server2, client2) {
|
|
|
1959
2056
|
title: "Delete Section",
|
|
1960
2057
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1961
2058
|
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.",
|
|
1962
|
-
inputSchema:
|
|
1963
|
-
noteId:
|
|
1964
|
-
headingText:
|
|
2059
|
+
inputSchema: z40.object({
|
|
2060
|
+
noteId: z40.string().describe("The note (Thought) ID"),
|
|
2061
|
+
headingText: z40.string().min(1).describe("Exact text of the heading whose section will be deleted")
|
|
1965
2062
|
})
|
|
1966
2063
|
},
|
|
1967
2064
|
async ({ noteId, headingText }) => {
|
|
@@ -1976,7 +2073,7 @@ function registerNoteDeleteSection(server2, client2) {
|
|
|
1976
2073
|
}
|
|
1977
2074
|
|
|
1978
2075
|
// ../mcp-core/src/tools/note-replace.ts
|
|
1979
|
-
import { z as
|
|
2076
|
+
import { z as z41 } from "zod";
|
|
1980
2077
|
function registerNoteReplace(server2, client2) {
|
|
1981
2078
|
server2.registerTool(
|
|
1982
2079
|
"naumu_note_replace",
|
|
@@ -1984,9 +2081,9 @@ function registerNoteReplace(server2, client2) {
|
|
|
1984
2081
|
title: "Replace Note",
|
|
1985
2082
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
1986
2083
|
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 `` 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.",
|
|
1987
|
-
inputSchema:
|
|
1988
|
-
noteId:
|
|
1989
|
-
markdown:
|
|
2084
|
+
inputSchema: z41.object({
|
|
2085
|
+
noteId: z41.string().describe("The note (Thought) ID"),
|
|
2086
|
+
markdown: z41.string().describe("New markdown content for the entire note")
|
|
1990
2087
|
})
|
|
1991
2088
|
},
|
|
1992
2089
|
async ({ noteId, markdown }) => {
|
|
@@ -1999,7 +2096,7 @@ function registerNoteReplace(server2, client2) {
|
|
|
1999
2096
|
}
|
|
2000
2097
|
|
|
2001
2098
|
// ../mcp-core/src/tools/note-find-replace.ts
|
|
2002
|
-
import { z as
|
|
2099
|
+
import { z as z42 } from "zod";
|
|
2003
2100
|
function registerNoteFindReplace(server2, client2) {
|
|
2004
2101
|
server2.registerTool(
|
|
2005
2102
|
"naumu_note_find_replace",
|
|
@@ -2007,11 +2104,11 @@ function registerNoteFindReplace(server2, client2) {
|
|
|
2007
2104
|
title: "Find/Replace in Note",
|
|
2008
2105
|
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false },
|
|
2009
2106
|
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 `` 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.",
|
|
2010
|
-
inputSchema:
|
|
2011
|
-
noteId:
|
|
2012
|
-
find:
|
|
2013
|
-
replace:
|
|
2014
|
-
all:
|
|
2107
|
+
inputSchema: z42.object({
|
|
2108
|
+
noteId: z42.string().describe("The note (Thought) ID"),
|
|
2109
|
+
find: z42.string().min(1).describe("Substring to search for. Literal - no regex."),
|
|
2110
|
+
replace: z42.string().describe("Replacement string. May be empty to delete the match."),
|
|
2111
|
+
all: z42.boolean().optional().describe("Replace all occurrences (default true). Pass false to replace only the first.")
|
|
2015
2112
|
})
|
|
2016
2113
|
},
|
|
2017
2114
|
async ({ noteId, find, replace, all }) => {
|
|
@@ -2028,7 +2125,7 @@ function registerNoteFindReplace(server2, client2) {
|
|
|
2028
2125
|
}
|
|
2029
2126
|
|
|
2030
2127
|
// ../mcp-core/src/tools/create-note.ts
|
|
2031
|
-
import { z as
|
|
2128
|
+
import { z as z43 } from "zod";
|
|
2032
2129
|
function registerCreateNote(server2, client2) {
|
|
2033
2130
|
server2.registerTool(
|
|
2034
2131
|
"naumu_create_note",
|
|
@@ -2036,12 +2133,12 @@ function registerCreateNote(server2, client2) {
|
|
|
2036
2133
|
title: "Create Note",
|
|
2037
2134
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false },
|
|
2038
2135
|
description: "Create a note in a graph, optionally with its full content already in place. Pass `markdown` to create the note and its body in a single call - the preferred path for imports and for any content you already hold. Returns the new note row including its `id`; use `naumu_note_append` / `naumu_note_replace` for LATER edits, not to fill in content you could have passed here. The returned row is the note as it stood BEFORE the body write landed, so its content may read as empty - the write still succeeded, do not retry the call or re-append the body. `attachment://` refs are not accepted in create-time `markdown`: upload the file after the note exists and embed it with a note write tool. 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 - a bot passing `topicIds` is rejected (bots hold no topic membership); use `sharedWithSpace` instead.",
|
|
2039
|
-
inputSchema:
|
|
2040
|
-
graphId:
|
|
2041
|
-
title:
|
|
2042
|
-
markdown:
|
|
2043
|
-
sharedWithSpace:
|
|
2044
|
-
topicIds:
|
|
2136
|
+
inputSchema: z43.object({
|
|
2137
|
+
graphId: z43.string().describe("The graph ID to create the note in"),
|
|
2138
|
+
title: z43.string().optional().describe("Optional title for the note"),
|
|
2139
|
+
markdown: z43.string().optional().describe("Full initial note content as markdown. Provide it here to create the note with its content in a single call - preferred for imports; do not restate large content through extra edit calls."),
|
|
2140
|
+
sharedWithSpace: z43.boolean().optional().describe("Share the note with everyone in the space. Omit (or false) to keep it private to its participants."),
|
|
2141
|
+
topicIds: z43.array(z43.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.")
|
|
2045
2142
|
})
|
|
2046
2143
|
},
|
|
2047
2144
|
async ({ graphId, title, markdown, sharedWithSpace, topicIds }) => {
|
|
@@ -2054,7 +2151,7 @@ function registerCreateNote(server2, client2) {
|
|
|
2054
2151
|
}
|
|
2055
2152
|
|
|
2056
2153
|
// ../mcp-core/src/tools/list-schema-violations.ts
|
|
2057
|
-
import { z as
|
|
2154
|
+
import { z as z44 } from "zod";
|
|
2058
2155
|
var DEFAULT_EXAMPLE_LIMIT = 5;
|
|
2059
2156
|
var rowsForKind = (violations, kind) => {
|
|
2060
2157
|
const rows = [];
|
|
@@ -2080,12 +2177,12 @@ function registerListSchemaViolations(server2, client2) {
|
|
|
2080
2177
|
title: "List Schema Violations",
|
|
2081
2178
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
2082
2179
|
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.",
|
|
2083
|
-
inputSchema:
|
|
2084
|
-
graphId:
|
|
2085
|
-
kind:
|
|
2180
|
+
inputSchema: z44.object({
|
|
2181
|
+
graphId: z44.string().describe("The graph ID"),
|
|
2182
|
+
kind: z44.string().optional().describe(
|
|
2086
2183
|
'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.'
|
|
2087
2184
|
),
|
|
2088
|
-
limit:
|
|
2185
|
+
limit: z44.number().int().min(1).optional().describe(
|
|
2089
2186
|
"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)."
|
|
2090
2187
|
)
|
|
2091
2188
|
})
|
|
@@ -2137,7 +2234,7 @@ function registerListSchemaViolations(server2, client2) {
|
|
|
2137
2234
|
}
|
|
2138
2235
|
|
|
2139
2236
|
// ../mcp-core/src/tools/list-dense-nodes.ts
|
|
2140
|
-
import { z as
|
|
2237
|
+
import { z as z45 } from "zod";
|
|
2141
2238
|
function registerListDenseNodes(server2, client2) {
|
|
2142
2239
|
server2.registerTool(
|
|
2143
2240
|
"naumu_list_dense_nodes",
|
|
@@ -2145,10 +2242,10 @@ function registerListDenseNodes(server2, client2) {
|
|
|
2145
2242
|
title: "List Dense Nodes",
|
|
2146
2243
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
2147
2244
|
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.',
|
|
2148
|
-
inputSchema:
|
|
2149
|
-
graphId:
|
|
2150
|
-
minConnections:
|
|
2151
|
-
nodeTypes:
|
|
2245
|
+
inputSchema: z45.object({
|
|
2246
|
+
graphId: z45.string().describe("The graph ID"),
|
|
2247
|
+
minConnections: z45.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."),
|
|
2248
|
+
nodeTypes: z45.array(z45.string()).optional().describe("Optional list of node types to restrict the scan to.")
|
|
2152
2249
|
})
|
|
2153
2250
|
},
|
|
2154
2251
|
async ({ graphId, minConnections, nodeTypes }) => {
|
|
@@ -2166,7 +2263,7 @@ function registerListDenseNodes(server2, client2) {
|
|
|
2166
2263
|
}
|
|
2167
2264
|
|
|
2168
2265
|
// ../mcp-core/src/tools/list-node-connections.ts
|
|
2169
|
-
import { z as
|
|
2266
|
+
import { z as z46 } from "zod";
|
|
2170
2267
|
function registerListNodeConnections(server2, client2) {
|
|
2171
2268
|
server2.registerTool(
|
|
2172
2269
|
"naumu_list_node_connections",
|
|
@@ -2174,11 +2271,11 @@ function registerListNodeConnections(server2, client2) {
|
|
|
2174
2271
|
title: "List Node Connections",
|
|
2175
2272
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
2176
2273
|
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}}] }`.',
|
|
2177
|
-
inputSchema:
|
|
2178
|
-
graphId:
|
|
2179
|
-
nodeId:
|
|
2180
|
-
edgeType:
|
|
2181
|
-
direction:
|
|
2274
|
+
inputSchema: z46.object({
|
|
2275
|
+
graphId: z46.string().describe("The graph ID"),
|
|
2276
|
+
nodeId: z46.string().describe("The node ID to inspect"),
|
|
2277
|
+
edgeType: z46.string().optional().describe('Restrict to a specific relation label (e.g. "ASSOCIATED_WITH"). Case-insensitive; non-alphanum chars are normalized.'),
|
|
2278
|
+
direction: z46.enum(["in", "out", "both"]).optional().describe('Edge direction filter - "in" (incoming), "out" (outgoing), "both" (default).')
|
|
2182
2279
|
})
|
|
2183
2280
|
},
|
|
2184
2281
|
async ({ graphId, nodeId, edgeType, direction }) => {
|
|
@@ -2196,7 +2293,7 @@ function registerListNodeConnections(server2, client2) {
|
|
|
2196
2293
|
}
|
|
2197
2294
|
|
|
2198
2295
|
// ../mcp-core/src/tools/reparent.ts
|
|
2199
|
-
import { z as
|
|
2296
|
+
import { z as z47 } from "zod";
|
|
2200
2297
|
function registerReparent(server2, client2) {
|
|
2201
2298
|
server2.registerTool(
|
|
2202
2299
|
"naumu_reparent",
|
|
@@ -2204,11 +2301,11 @@ function registerReparent(server2, client2) {
|
|
|
2204
2301
|
title: "Reparent Node",
|
|
2205
2302
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
2206
2303
|
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"}`.',
|
|
2207
|
-
inputSchema:
|
|
2208
|
-
graphId:
|
|
2209
|
-
nodeId:
|
|
2210
|
-
newParentId:
|
|
2211
|
-
newRelation:
|
|
2304
|
+
inputSchema: z47.object({
|
|
2305
|
+
graphId: z47.string().describe("The graph ID"),
|
|
2306
|
+
nodeId: z47.string().describe("The child node to reparent"),
|
|
2307
|
+
newParentId: z47.string().describe("The new parent node id"),
|
|
2308
|
+
newRelation: z47.string().describe('The new parent edge relation label (e.g. "PART_OF"). Must be valid per the schema for (child.type, relation, parent.type).')
|
|
2212
2309
|
})
|
|
2213
2310
|
},
|
|
2214
2311
|
async ({ graphId, nodeId, newParentId, newRelation }) => {
|
|
@@ -2224,7 +2321,7 @@ function registerReparent(server2, client2) {
|
|
|
2224
2321
|
}
|
|
2225
2322
|
|
|
2226
2323
|
// ../mcp-core/src/tools/batch-reparent.ts
|
|
2227
|
-
import { z as
|
|
2324
|
+
import { z as z48 } from "zod";
|
|
2228
2325
|
function registerBatchReparent(server2, client2) {
|
|
2229
2326
|
server2.registerTool(
|
|
2230
2327
|
"naumu_batch_reparent",
|
|
@@ -2232,11 +2329,11 @@ function registerBatchReparent(server2, client2) {
|
|
|
2232
2329
|
title: "Batch Reparent Nodes",
|
|
2233
2330
|
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
2234
2331
|
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?}]`.',
|
|
2235
|
-
inputSchema:
|
|
2236
|
-
graphId:
|
|
2237
|
-
newParentId:
|
|
2238
|
-
newRelation:
|
|
2239
|
-
nodeIds:
|
|
2332
|
+
inputSchema: z48.object({
|
|
2333
|
+
graphId: z48.string().describe("The graph ID"),
|
|
2334
|
+
newParentId: z48.string().describe("Parent node id every nodeId in the batch will be parented to"),
|
|
2335
|
+
newRelation: z48.string().describe("Parent edge relation label (must be valid per schema for child.type \u2192 parent.type)"),
|
|
2336
|
+
nodeIds: z48.array(z48.string()).min(1).max(25).describe("1\u201325 child node ids to reparent under `newParentId`")
|
|
2240
2337
|
})
|
|
2241
2338
|
},
|
|
2242
2339
|
async ({ graphId, newParentId, newRelation, nodeIds }) => {
|
|
@@ -2253,7 +2350,7 @@ function registerBatchReparent(server2, client2) {
|
|
|
2253
2350
|
}
|
|
2254
2351
|
|
|
2255
2352
|
// ../mcp-core/src/tools/chatgpt-search.ts
|
|
2256
|
-
import { z as
|
|
2353
|
+
import { z as z49 } from "zod";
|
|
2257
2354
|
|
|
2258
2355
|
// ../mcp-core/src/public-origin.ts
|
|
2259
2356
|
function publicOrigin() {
|
|
@@ -2307,8 +2404,8 @@ function registerChatgptSearch(server2, client2) {
|
|
|
2307
2404
|
title: "Search",
|
|
2308
2405
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
2309
2406
|
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.)",
|
|
2310
|
-
inputSchema:
|
|
2311
|
-
query:
|
|
2407
|
+
inputSchema: z49.object({
|
|
2408
|
+
query: z49.string().describe(
|
|
2312
2409
|
"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."
|
|
2313
2410
|
)
|
|
2314
2411
|
})
|
|
@@ -2342,7 +2439,7 @@ function registerChatgptSearch(server2, client2) {
|
|
|
2342
2439
|
}
|
|
2343
2440
|
|
|
2344
2441
|
// ../mcp-core/src/tools/chatgpt-fetch.ts
|
|
2345
|
-
import { z as
|
|
2442
|
+
import { z as z50 } from "zod";
|
|
2346
2443
|
var NON_ATTRIBUTE_PROPS = /* @__PURE__ */ new Set([
|
|
2347
2444
|
"id",
|
|
2348
2445
|
"label",
|
|
@@ -2436,8 +2533,8 @@ function registerChatgptFetch(server2, client2) {
|
|
|
2436
2533
|
title: "Fetch",
|
|
2437
2534
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
2438
2535
|
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.",
|
|
2439
|
-
inputSchema:
|
|
2440
|
-
id:
|
|
2536
|
+
inputSchema: z50.object({
|
|
2537
|
+
id: z50.string().describe("A resource id from a previous `search` result, in the form `<graphId>:<nodeId>`.")
|
|
2441
2538
|
})
|
|
2442
2539
|
},
|
|
2443
2540
|
async ({ id }) => {
|
|
@@ -2480,7 +2577,7 @@ function registerChatgptFetch(server2, client2) {
|
|
|
2480
2577
|
}
|
|
2481
2578
|
|
|
2482
2579
|
// ../mcp-core/src/tools/admission-status.ts
|
|
2483
|
-
import { z as
|
|
2580
|
+
import { z as z51 } from "zod";
|
|
2484
2581
|
function registerAdmissionStatus(server2, client2) {
|
|
2485
2582
|
server2.registerTool(
|
|
2486
2583
|
"naumu_admission_status",
|
|
@@ -2488,8 +2585,8 @@ function registerAdmissionStatus(server2, client2) {
|
|
|
2488
2585
|
title: "Admission Status",
|
|
2489
2586
|
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: false },
|
|
2490
2587
|
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.",
|
|
2491
|
-
inputSchema:
|
|
2492
|
-
graphId:
|
|
2588
|
+
inputSchema: z51.object({
|
|
2589
|
+
graphId: z51.string().describe("The space (graph) ID to inspect admission for. You must be a member of this space.")
|
|
2493
2590
|
})
|
|
2494
2591
|
},
|
|
2495
2592
|
async ({ graphId }) => {
|
|
@@ -2519,7 +2616,7 @@ function registerAdmissionStatus(server2, client2) {
|
|
|
2519
2616
|
}
|
|
2520
2617
|
|
|
2521
2618
|
// ../mcp-core/src/tools/whitelist-members.ts
|
|
2522
|
-
import { z as
|
|
2619
|
+
import { z as z52 } from "zod";
|
|
2523
2620
|
function registerWhitelistMembers(server2, client2) {
|
|
2524
2621
|
server2.registerTool(
|
|
2525
2622
|
"naumu_whitelist_members",
|
|
@@ -2532,10 +2629,10 @@ function registerWhitelistMembers(server2, client2) {
|
|
|
2532
2629
|
openWorldHint: false
|
|
2533
2630
|
},
|
|
2534
2631
|
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.",
|
|
2535
|
-
inputSchema:
|
|
2536
|
-
graphId:
|
|
2537
|
-
emails:
|
|
2538
|
-
repoInit:
|
|
2632
|
+
inputSchema: z52.object({
|
|
2633
|
+
graphId: z52.string().describe("The space (graph) ID to whitelist emails for. You must be a member of this space."),
|
|
2634
|
+
emails: z52.array(z52.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."),
|
|
2635
|
+
repoInit: z52.boolean().optional().describe("Set true when this whitelist is being seeded as part of the repo init flow, so onboarding is tracked correctly.")
|
|
2539
2636
|
})
|
|
2540
2637
|
},
|
|
2541
2638
|
async ({ graphId, emails, repoInit }) => {
|
|
@@ -2559,7 +2656,7 @@ function registerWhitelistMembers(server2, client2) {
|
|
|
2559
2656
|
}
|
|
2560
2657
|
|
|
2561
2658
|
// ../mcp-core/src/tools/resolve-admission.ts
|
|
2562
|
-
import { z as
|
|
2659
|
+
import { z as z53 } from "zod";
|
|
2563
2660
|
function registerResolveAdmission(server2, client2) {
|
|
2564
2661
|
server2.registerTool(
|
|
2565
2662
|
"naumu_resolve_admission",
|
|
@@ -2572,9 +2669,9 @@ function registerResolveAdmission(server2, client2) {
|
|
|
2572
2669
|
openWorldHint: false
|
|
2573
2670
|
},
|
|
2574
2671
|
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.",
|
|
2575
|
-
inputSchema:
|
|
2576
|
-
graphId:
|
|
2577
|
-
gitEmailHint:
|
|
2672
|
+
inputSchema: z53.object({
|
|
2673
|
+
graphId: z53.string().describe("The space (graph) ID referenced by the repo .naumu file that the user wants to join."),
|
|
2674
|
+
gitEmailHint: z53.string().optional().describe("The email from `git config user.email`, used to match whitelist entries and auto-join domains.")
|
|
2578
2675
|
})
|
|
2579
2676
|
},
|
|
2580
2677
|
async ({ graphId, gitEmailHint }) => {
|
|
@@ -2598,7 +2695,7 @@ function registerResolveAdmission(server2, client2) {
|
|
|
2598
2695
|
}
|
|
2599
2696
|
|
|
2600
2697
|
// ../mcp-core/src/tools/resolve-join-request.ts
|
|
2601
|
-
import { z as
|
|
2698
|
+
import { z as z54 } from "zod";
|
|
2602
2699
|
function registerResolveJoinRequest(server2, client2) {
|
|
2603
2700
|
server2.registerTool(
|
|
2604
2701
|
"naumu_resolve_join_request",
|
|
@@ -2611,10 +2708,10 @@ function registerResolveJoinRequest(server2, client2) {
|
|
|
2611
2708
|
openWorldHint: false
|
|
2612
2709
|
},
|
|
2613
2710
|
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.",
|
|
2614
|
-
inputSchema:
|
|
2615
|
-
graphId:
|
|
2616
|
-
requestId:
|
|
2617
|
-
action:
|
|
2711
|
+
inputSchema: z54.object({
|
|
2712
|
+
graphId: z54.string().describe("The space (graph) ID the request is for. You must be a member of this space."),
|
|
2713
|
+
requestId: z54.string().describe("The pending join request ID, taken from naumu_admission_status."),
|
|
2714
|
+
action: z54.enum(["approve", "deny"]).describe("approve adds the requester as a member; deny rejects the request.")
|
|
2618
2715
|
})
|
|
2619
2716
|
},
|
|
2620
2717
|
async ({ graphId, requestId, action }) => {
|
|
@@ -2683,7 +2780,9 @@ var TOOL_REGISTRARS = {
|
|
|
2683
2780
|
naumu_delegate: registerDelegate,
|
|
2684
2781
|
// naumu_traverse omitted on purpose — backend stub returns 503 (see import note).
|
|
2685
2782
|
naumu_post_message: registerPostMessage,
|
|
2783
|
+
naumu_add_participants: registerAddParticipants,
|
|
2686
2784
|
naumu_read_thread: registerReadThread,
|
|
2785
|
+
naumu_wait_for_activity: registerWaitForActivity,
|
|
2687
2786
|
naumu_whoami: registerWhoami,
|
|
2688
2787
|
naumu_list_threads: registerListThreads,
|
|
2689
2788
|
naumu_list_topics: registerListTopics,
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "ai.naumu/mcp",
|
|
4
4
|
"title": "Naumu",
|
|
5
5
|
"description": "Search, extend, and act on your team's Naumu knowledge graph: notes, threads, and nodes.",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.13.0",
|
|
7
7
|
"websiteUrl": "https://naumu.ai",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/naumu-ai/mcp",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"registryType": "npm",
|
|
28
28
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
29
29
|
"identifier": "@naumu/mcp",
|
|
30
|
-
"version": "0.
|
|
30
|
+
"version": "0.13.0",
|
|
31
31
|
"runtimeHint": "npx",
|
|
32
32
|
"transport": { "type": "stdio" },
|
|
33
33
|
"environmentVariables": [
|