@contextstream/mcp-server 0.3.52 → 0.3.53

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 +36 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5174,6 +5174,19 @@ var ContextStreamClient = class {
5174
5174
  };
5175
5175
  return request(this.config, "/graph/impact-analysis", { body: apiBody });
5176
5176
  }
5177
+ graphIngest(body) {
5178
+ const withDefaults = this.withDefaults(body);
5179
+ const projectId = withDefaults.project_id;
5180
+ if (!projectId) {
5181
+ throw new Error("project_id is required to ingest the graph.");
5182
+ }
5183
+ uuidSchema.parse(projectId);
5184
+ const apiBody = {};
5185
+ if (body.wait !== void 0) {
5186
+ apiBody.wait = body.wait;
5187
+ }
5188
+ return request(this.config, `/graph/ingest/${projectId}`, { body: apiBody });
5189
+ }
5177
5190
  // AI
5178
5191
  buildAiContextRequest(input) {
5179
5192
  const payload = {
@@ -7244,6 +7257,7 @@ var CONTEXTSTREAM_TOOL_NAMES = [
7244
7257
  "graph_impact",
7245
7258
  "graph_circular_dependencies",
7246
7259
  "graph_unused_code",
7260
+ "graph_ingest",
7247
7261
  "graph_contradictions",
7248
7262
  // AI (PRO)
7249
7263
  "ai_context",
@@ -7474,7 +7488,7 @@ To expose all tools below, set \`CONTEXTSTREAM_TOOLSET=full\` in your MCP config
7474
7488
  \`memory_create_event\`, \`memory_bulk_ingest\`, \`memory_list_events\`, \`memory_create_node\`, \`memory_list_nodes\`, \`memory_search\`, \`memory_decisions\`, \`memory_get_event\`, \`memory_update_event\`, \`memory_delete_event\`, \`memory_distill_event\`, \`memory_get_node\`, \`memory_update_node\`, \`memory_delete_node\`, \`memory_supersede_node\`, \`memory_timeline\`, \`memory_summary\`
7475
7489
 
7476
7490
  **Graph** (code analysis):
7477
- \`graph_related\`, \`graph_path\`, \`graph_decisions\`, \`graph_dependencies\`, \`graph_call_path\`, \`graph_impact\`, \`graph_circular_dependencies\`, \`graph_unused_code\`, \`graph_contradictions\`
7491
+ \`graph_related\`, \`graph_path\`, \`graph_decisions\`, \`graph_dependencies\`, \`graph_call_path\`, \`graph_impact\`, \`graph_circular_dependencies\`, \`graph_unused_code\`, \`graph_ingest\`, \`graph_contradictions\`
7478
7492
 
7479
7493
  **AI** (PRO):
7480
7494
  \`ai_context\`, \`ai_enhanced_context\`, \`ai_context_budget\`, \`ai_embeddings\`, \`ai_plan\`, \`ai_tasks\`
@@ -7670,6 +7684,7 @@ var TOOL_CATALOG = [
7670
7684
  { name: "path", hint: "trace" },
7671
7685
  { name: "decisions", hint: "choices" },
7672
7686
  { name: "dependencies", hint: "deps" },
7687
+ { name: "ingest", hint: "build" },
7673
7688
  { name: "impact", hint: "changes" },
7674
7689
  { name: "contradictions", hint: "conflicts" }
7675
7690
  ]
@@ -7856,6 +7871,7 @@ var STANDARD_TOOLSET = /* @__PURE__ */ new Set([
7856
7871
  "graph_impact",
7857
7872
  "graph_circular_dependencies",
7858
7873
  "graph_unused_code",
7874
+ "graph_ingest",
7859
7875
  // Search (3)
7860
7876
  "search_semantic",
7861
7877
  "search_hybrid",
@@ -8631,6 +8647,25 @@ Access: Free`,
8631
8647
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
8632
8648
  }
8633
8649
  );
8650
+ registerTool(
8651
+ "graph_ingest",
8652
+ {
8653
+ title: "Ingest code graph",
8654
+ description: "Build and persist the dependency graph for a project",
8655
+ inputSchema: external_exports.object({
8656
+ project_id: external_exports.string().uuid().optional(),
8657
+ wait: external_exports.boolean().optional().describe("If true, wait for ingestion to finish before returning.")
8658
+ })
8659
+ },
8660
+ async (input) => {
8661
+ const projectId = resolveProjectId(input.project_id);
8662
+ if (!projectId) {
8663
+ return errorResult("Error: project_id is required. Please call session_init first or provide project_id explicitly.");
8664
+ }
8665
+ const result = await client.graphIngest({ project_id: projectId, wait: input.wait });
8666
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
8667
+ }
8668
+ );
8634
8669
  registerTool(
8635
8670
  "ai_context",
8636
8671
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextstream/mcp-server",
3
- "version": "0.3.52",
3
+ "version": "0.3.53",
4
4
  "description": "MCP server exposing ContextStream public API - code context, memory, search, and AI tools for developers",
5
5
  "type": "module",
6
6
  "license": "MIT",