@endiagram/mcp 0.2.24 → 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 +14 -4
- package/package.json +1 -1
- package/tools.json +2 -1
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
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
package/tools.json
CHANGED
|
@@ -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
|
]
|