@endiagram/mcp 0.2.24 → 0.2.26

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.24",
3
+ "version": "0.2.26",
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
@@ -62,7 +62,9 @@
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": "view", "type": "string", "description": "View mode: flow (default), actors (swimlane by actor), locations (grouped by context), summary (one node per subsystem)", "required": false},
67
+ {"name": "output", "type": "string", "description": "File path to save the SVG", "required": false}
66
68
  ]
67
69
  }
68
70
  ]