@contextstream/mcp-server 0.4.10 → 0.4.11

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 (2) hide show
  1. package/dist/index.js +17 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13441,19 +13441,30 @@ Use this to remove a reminder that is no longer relevant.`,
13441
13441
  if (!input.path) {
13442
13442
  return errorResult("ingest_local requires: path");
13443
13443
  }
13444
+ if (!projectId) {
13445
+ return errorResult("ingest_local requires: project_id");
13446
+ }
13444
13447
  const validPath = await validateReadableDirectory(input.path);
13445
13448
  if (!validPath.ok) {
13446
13449
  return errorResult(validPath.error);
13447
13450
  }
13448
- const files = await readAllFilesInBatches(validPath.resolvedPath, async (batch) => {
13449
- await client.ingestLocalFiles({
13450
- project_id: projectId,
13451
- files: batch,
13451
+ let totalFiles = 0;
13452
+ let batches = 0;
13453
+ for await (const batch of readAllFilesInBatches(validPath.resolvedPath, { batchSize: 50 })) {
13454
+ if (batch.length === 0) continue;
13455
+ await client.ingestFiles(projectId, batch, {
13452
13456
  overwrite: input.overwrite,
13453
13457
  write_to_disk: input.write_to_disk
13454
13458
  });
13455
- });
13456
- const result = { files_ingested: files, project_id: projectId };
13459
+ totalFiles += batch.length;
13460
+ batches += 1;
13461
+ }
13462
+ const result = {
13463
+ project_id: projectId,
13464
+ files_ingested: totalFiles,
13465
+ batches,
13466
+ path: validPath.resolvedPath
13467
+ };
13457
13468
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
13458
13469
  }
13459
13470
  default:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contextstream/mcp-server",
3
3
  "mcpName": "io.github.contextstreamio/mcp-server",
4
- "version": "0.4.10",
4
+ "version": "0.4.11",
5
5
  "description": "ContextStream MCP server - v0.4.x with consolidated domain tools (~11 tools, ~75% token reduction). Code context, memory, search, and AI tools.",
6
6
  "type": "module",
7
7
  "license": "MIT",