vantage-peers-mcp 2.14.2 → 2.15.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/README.md CHANGED
@@ -373,6 +373,12 @@ Same two advisory VP-Sources doctrine paragraphs appended after the existing des
373
373
  - `search_components_by_keyword` (alias `search_components`) — keyword search over components
374
374
  - `hybrid_search` — RRF-fused vector + BM25 search; VP-Sources doctrine applies
375
375
 
376
+ Knowledge Base document upload is a two-step flow (see `docs/cloud/kb-ingest.md`):
377
+ 1. `generate_upload_url` — mints a signed Convex storage upload URL (Convex mutation `kbMutations:generateUploadUrl`, requires a Clerk JWT with `org_id`). `POST` the binary to that URL to obtain a `storageId`.
378
+ 2. `store_document_chunked` — with the `storageId`, extracts text, chunks (~512 tokens), and schedules RAG embedding per chunk at write time.
379
+
380
+ Ingested documents are then fully retrievable through `recall`, `text_search`, and `hybrid_search` like any other memory (Day 122 indexing fix + Day 123 `generate_upload_url` — the previously-missing upload entrypoint that made the KB end-to-end usable).
381
+
376
382
  #### `recall` — VP-Sources doctrine (PR-H)
377
383
 
378
384
  Alias of `search_memories_by_semantic`. Exports `RECALL_TOOL_DESCRIPTION` from `mcp-server/src/tools.ts`.
@@ -58,6 +58,8 @@ export declare const SOFT_DELETE_DOCUMENT_TOOL_DESCRIPTION: string;
58
58
  export declare const softDeleteDocumentArgsSchema: z.ZodObject<{
59
59
  docId: z.ZodString;
60
60
  }, z.core.$strip>;
61
+ export declare const GENERATE_UPLOAD_URL_TOOL_DESCRIPTION: string;
62
+ export declare const generateUploadUrlArgsSchema: z.ZodObject<{}, z.core.$strip>;
61
63
  /**
62
64
  * Register store_document_chunked + soft_delete_document MCP tools.
63
65
  *
@@ -76,6 +76,15 @@ export const softDeleteDocumentArgsSchema = z.object({
76
76
  .describe("Document ID returned by store_document_chunked. " +
77
77
  "All chunks at namespace team/<orgId>/<docId> will be soft-deleted."),
78
78
  });
79
+ export const GENERATE_UPLOAD_URL_TOOL_DESCRIPTION = "Mint a Convex storage upload URL for the Knowledge Base ingest flow. " +
80
+ "The caller's org (from the Clerk JWT) is bound implicitly — no client args required. " +
81
+ "POST the file binary to the returned URL to obtain a storageId, then call " +
82
+ "store_document_chunked with that storageId. " +
83
+ "Requires Clerk JWT with org_id — no-org bearers are rejected. " +
84
+ "Default limit: 1 URL per call. cap: 1 URL. " +
85
+ "Returns the upload URL as plain text. " +
86
+ "EXAMPLE: generate_upload_url (no args) → 'https://…convex.cloud/api/storage/upload?...'.";
87
+ export const generateUploadUrlArgsSchema = z.object({});
79
88
  // ─────────────────────────────────────────────────────────────────────────────
80
89
  // Registration
81
90
  // ─────────────────────────────────────────────────────────────────────────────
@@ -177,4 +186,33 @@ export function registerKbIngestTools(server, convex, oauthCtx) {
177
186
  throw new McpError(ErrorCode.InternalError, message);
178
187
  }
179
188
  });
189
+ // ── generate_upload_url ─────────────────────────────────────────────────────
190
+ server.tool("generate_upload_url", GENERATE_UPLOAD_URL_TOOL_DESCRIPTION, generateUploadUrlArgsSchema.shape, {
191
+ readOnlyHint: false,
192
+ openWorldHint: false,
193
+ destructiveHint: false,
194
+ title: "Generate Knowledge Base upload URL",
195
+ }, async () => {
196
+ try {
197
+ const { orgId, namespacePrefix } = resolveOrgContext();
198
+ const url = (await convex.mutation("kbMutations:generateUploadUrl", { orgId, namespace: namespacePrefix }));
199
+ return {
200
+ content: [
201
+ {
202
+ type: "text",
203
+ text: url,
204
+ },
205
+ ],
206
+ };
207
+ }
208
+ catch (error) {
209
+ if (error instanceof McpError)
210
+ throw error;
211
+ const message = error instanceof Error ? error.message : String(error);
212
+ console.error("[generate_upload_url] mutation failed", {
213
+ errorMessage: message,
214
+ });
215
+ throw new McpError(ErrorCode.InternalError, message);
216
+ }
217
+ });
180
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vantage-peers-mcp",
3
- "version": "2.14.2",
3
+ "version": "2.15.0",
4
4
  "description": "MCP server for VantagePeers — shared memory, messaging, and task coordination for AI agent teams",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",