@contextstream/mcp-server 0.4.4 → 0.4.6

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 +33 -11
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12413,9 +12413,20 @@ Use this to remove a reminder that is no longer relevant.`,
12413
12413
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
12414
12414
  }
12415
12415
  case "capture_lesson": {
12416
- if (!input.title || !input.category || !input.trigger || !input.impact || !input.prevention) {
12417
- return errorResult("capture_lesson requires: title, category, trigger, impact, prevention");
12416
+ if (!input.title || !input.trigger || !input.impact || !input.prevention) {
12417
+ return errorResult("capture_lesson requires: title, trigger, impact, prevention");
12418
12418
  }
12419
+ const lessonContent = [
12420
+ `## ${input.title}`,
12421
+ `**Severity:** ${input.severity || "medium"}`,
12422
+ input.category ? `**Category:** ${input.category}` : "",
12423
+ `### Trigger`,
12424
+ input.trigger,
12425
+ `### Impact`,
12426
+ input.impact,
12427
+ `### Prevention`,
12428
+ input.prevention
12429
+ ].filter(Boolean).join("\n");
12419
12430
  const lessonInput = {
12420
12431
  title: input.title,
12421
12432
  category: input.category,
@@ -12431,16 +12442,25 @@ Use this to remove a reminder that is no longer relevant.`,
12431
12442
  if (isDuplicateLessonCapture(signature)) {
12432
12443
  return { content: [{ type: "text", text: formatContent({ deduplicated: true, message: "Lesson already captured recently" }) }] };
12433
12444
  }
12434
- const result = await client.captureLesson(lessonInput);
12445
+ const result = await client.captureContext({
12446
+ workspace_id: workspaceId,
12447
+ project_id: projectId,
12448
+ event_type: "lesson",
12449
+ title: input.title,
12450
+ content: lessonContent,
12451
+ importance: input.severity === "critical" ? "critical" : input.severity === "high" ? "high" : "medium",
12452
+ tags: input.keywords || []
12453
+ });
12435
12454
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
12436
12455
  }
12437
12456
  case "get_lessons": {
12438
- const result = await client.getLessons({
12457
+ if (!workspaceId) {
12458
+ return errorResult("get_lessons requires workspace_id. Call session_init first.");
12459
+ }
12460
+ const result = await client.getHighPriorityLessons({
12439
12461
  workspace_id: workspaceId,
12440
12462
  project_id: projectId,
12441
- query: input.query,
12442
- category: input.category,
12443
- severity: input.severity,
12463
+ context_hint: input.query,
12444
12464
  limit: input.limit
12445
12465
  });
12446
12466
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
@@ -12449,10 +12469,12 @@ Use this to remove a reminder that is no longer relevant.`,
12449
12469
  if (!input.query) {
12450
12470
  return errorResult("recall requires: query");
12451
12471
  }
12452
- const result = await client.recallContext({
12472
+ const result = await client.smartSearch({
12453
12473
  workspace_id: workspaceId,
12454
12474
  project_id: projectId,
12455
- query: input.query
12475
+ query: input.query,
12476
+ include_related: input.include_related,
12477
+ include_decisions: input.include_decisions
12456
12478
  });
12457
12479
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
12458
12480
  }
@@ -12460,7 +12482,7 @@ Use this to remove a reminder that is no longer relevant.`,
12460
12482
  if (!input.content) {
12461
12483
  return errorResult("remember requires: content");
12462
12484
  }
12463
- const result = await client.rememberContext({
12485
+ const result = await client.sessionRemember({
12464
12486
  workspace_id: workspaceId,
12465
12487
  project_id: projectId,
12466
12488
  content: input.content,
@@ -12473,7 +12495,7 @@ Use this to remove a reminder that is no longer relevant.`,
12473
12495
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
12474
12496
  }
12475
12497
  case "summary": {
12476
- const result = await client.getSessionSummary({
12498
+ const result = await client.getContextSummary({
12477
12499
  workspace_id: workspaceId,
12478
12500
  project_id: projectId,
12479
12501
  max_tokens: input.max_tokens
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.4",
4
+ "version": "0.4.6",
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",