@drawio/mcp 1.2.0 → 1.2.1
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/package.json +1 -1
- package/src/index.js +19 -0
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -283,6 +283,25 @@ server.setRequestHandler(CallToolRequestSchema, async (request) =>
|
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
285
|
|
|
286
|
+
if (typeof inputContent !== "string")
|
|
287
|
+
{
|
|
288
|
+
const actualType = typeof inputContent;
|
|
289
|
+
const preview = JSON.stringify(inputContent).substring(0, 200);
|
|
290
|
+
|
|
291
|
+
return {
|
|
292
|
+
content:
|
|
293
|
+
[
|
|
294
|
+
{
|
|
295
|
+
type: "text",
|
|
296
|
+
text: `Error: content parameter must be a string, but received ${actualType}: ${preview}\n\n` +
|
|
297
|
+
"Common mistake: passing a JSON object or nested structure instead of a plain string. " +
|
|
298
|
+
"Make sure the diagram content (XML, CSV, or Mermaid) is passed directly as a string value.",
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
isError: true,
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
286
305
|
content = inputContent;
|
|
287
306
|
|
|
288
307
|
switch (name)
|