@endiagram/mcp 0.2.23 → 0.2.25

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/dist/index.js CHANGED
@@ -74,10 +74,20 @@ for (const tool of toolsConfig.tools) {
74
74
  isError: result.isError,
75
75
  };
76
76
  }
77
- const outDir = join(process.cwd(), ".endiagram");
78
- if (!existsSync(outDir))
79
- mkdirSync(outDir, { recursive: true });
80
- const filePath = join(outDir, `en-${Date.now()}.svg`);
77
+ const outputPath = args.output;
78
+ let filePath;
79
+ if (outputPath) {
80
+ const dir = dirname(outputPath);
81
+ if (!existsSync(dir))
82
+ mkdirSync(dir, { recursive: true });
83
+ filePath = outputPath;
84
+ }
85
+ else {
86
+ const outDir = join(process.cwd(), ".endiagram");
87
+ if (!existsSync(outDir))
88
+ mkdirSync(outDir, { recursive: true });
89
+ filePath = join(outDir, `en-${Date.now()}.svg`);
90
+ }
81
91
  writeFileSync(filePath, result.svg);
82
92
  return {
83
93
  content: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endiagram/mcp",
3
- "version": "0.2.23",
3
+ "version": "0.2.25",
4
4
  "description": "MCP server for EN Diagram — deterministic structural analysis backed by named theorems",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/tools.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "instructions": "EN Diagram is a structural verification engine for concurrent systems. No AI inside.\n\nTo describe a system, write one statement per line:\n actor do: action needs: input1, input2 yields: output1, output2 at: context\n\nShared names between yields and needs create connections automatically. Multi-word names work fine. Use commas to separate multiple inputs or outputs. at: scopes the action to a context (service, team, region, domain, layer — whatever boundary fits the system).\n\nSix tools answer six questions from concurrency theory. Each answer includes who (actors) and where (locations) alongside the structural findings.\n\n1. structure — what is this system?\n2. invariant — what's always true?\n3. live — can it deadlock? can entities overflow?\n4. reachable — can X reach Y?\n5. equivalent — are two systems the same?\n6. compose — how do parts combine?\n\nEvery tool output contains node names, values, and structural properties that can be fed directly into other tools. Read the output. Find the surprising node, the unexpected value, the structural anomaly. Then pick the tool that investigates THAT specific finding.\n\nDo not stop at one tool call. The first call reveals the structure — the real insight comes from the second, third, fourth call that digs into what the first one found.\n\nSpeak in the user's domain, not in graph theory. Only call render when the user explicitly asks to visualize.",
2
+ "instructions": "EN Diagram is a structural verification engine for concurrent systems. No AI inside.\n\nTo describe a system, write one statement per line:\n actor do: action needs: input1, input2 yields: output1, output2 at: context\n\nEvery statement requires: actor, do:, needs:, and yields:. Shared names between yields and needs create connections automatically. Multi-word names work fine. Use commas to separate multiple inputs or outputs. at: scopes the action to a context (service, team, region, domain, layer — whatever boundary fits the system).\n\nSix tools answer six questions from concurrency theory. Each answer includes who (actors) and where (locations) alongside the structural findings.\n\n1. structure — what is this system?\n2. invariant — what's always true?\n3. live — can it deadlock? can entities overflow?\n4. reachable — can X reach Y?\n5. equivalent — are two systems the same?\n6. compose — how do parts combine?\n\nEvery tool output contains node names, values, and structural properties that can be fed directly into other tools. Read the output. Find the surprising node, the unexpected value, the structural anomaly. Then pick the tool that investigates THAT specific finding.\n\nDo not stop at one tool call. The first call reveals the structure — the real insight comes from the second, third, fourth call that digs into what the first one found.\n\nSpeak in the user's domain, not in graph theory. Only call render when the user explicitly asks to visualize.",
3
3
  "tools": [
4
4
  {
5
5
  "name": "structure",
@@ -62,7 +62,8 @@
62
62
  "parameters": [
63
63
  {"name": "source", "type": "string", "description": "EN source code describing the system", "required": true},
64
64
  {"name": "theme", "type": "string", "description": "Color theme: dark or light", "required": false},
65
- {"name": "quality", "type": "string", "description": "Output quality: small, mid, or max", "required": false}
65
+ {"name": "quality", "type": "string", "description": "Output quality: small, mid, or max", "required": false},
66
+ {"name": "output", "type": "string", "description": "File path to save the SVG", "required": false}
66
67
  ]
67
68
  }
68
69
  ]