@contextstream/mcp-server 0.4.4 → 0.4.5

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 +22 -3
  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,7 +12442,15 @@ 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": {
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.5",
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",