@justanothermldude/mcp-exec 1.7.4 → 1.7.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.
- package/dist/index.js +12 -2
- package/dist/tools/tool-catalog.js +12 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -230,7 +230,12 @@ function compactTypeHint(propSchema) {
|
|
|
230
230
|
const keys = Object.keys(props);
|
|
231
231
|
if (keys.length === 0)
|
|
232
232
|
return "object";
|
|
233
|
-
const
|
|
233
|
+
const PRIM = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean"]);
|
|
234
|
+
const parts = keys.map((k) => {
|
|
235
|
+
const sub = props[k]?.type;
|
|
236
|
+
const sfx = required.includes(k) ? "" : "?";
|
|
237
|
+
return PRIM.has(sub ?? "") ? `${k}${sfx}:${sub}` : `${k}${sfx}`;
|
|
238
|
+
});
|
|
234
239
|
return `{${parts.join(", ")}}`;
|
|
235
240
|
}
|
|
236
241
|
if (type === "object") {
|
|
@@ -242,7 +247,12 @@ function compactTypeHint(propSchema) {
|
|
|
242
247
|
const props = items.properties;
|
|
243
248
|
const required = items.required || [];
|
|
244
249
|
const keys = Object.keys(props);
|
|
245
|
-
const
|
|
250
|
+
const PRIM = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean"]);
|
|
251
|
+
const parts = keys.map((k) => {
|
|
252
|
+
const sub = props[k]?.type;
|
|
253
|
+
const sfx = required.includes(k) ? "" : "?";
|
|
254
|
+
return PRIM.has(sub ?? "") ? `${k}${sfx}:${sub}` : `${k}${sfx}`;
|
|
255
|
+
});
|
|
246
256
|
return `[{${parts.join(", ")}}]`;
|
|
247
257
|
}
|
|
248
258
|
return null;
|
|
@@ -44,7 +44,12 @@ function compactTypeHint(propSchema) {
|
|
|
44
44
|
const keys = Object.keys(props);
|
|
45
45
|
if (keys.length === 0)
|
|
46
46
|
return 'object';
|
|
47
|
-
const
|
|
47
|
+
const PRIM = new Set(['string', 'number', 'integer', 'boolean']);
|
|
48
|
+
const parts = keys.map(k => {
|
|
49
|
+
const sub = props[k]?.type;
|
|
50
|
+
const sfx = required.includes(k) ? '' : '?';
|
|
51
|
+
return PRIM.has(sub ?? '') ? `${k}${sfx}:${sub}` : `${k}${sfx}`;
|
|
52
|
+
});
|
|
48
53
|
return `{${parts.join(', ')}}`;
|
|
49
54
|
}
|
|
50
55
|
// Freeform object — AI must call get_mcp_tool_schema before using
|
|
@@ -58,7 +63,12 @@ function compactTypeHint(propSchema) {
|
|
|
58
63
|
const props = items.properties;
|
|
59
64
|
const required = items.required || [];
|
|
60
65
|
const keys = Object.keys(props);
|
|
61
|
-
const
|
|
66
|
+
const PRIM = new Set(['string', 'number', 'integer', 'boolean']);
|
|
67
|
+
const parts = keys.map(k => {
|
|
68
|
+
const sub = props[k]?.type;
|
|
69
|
+
const sfx = required.includes(k) ? '' : '?';
|
|
70
|
+
return PRIM.has(sub ?? '') ? `${k}${sfx}:${sub}` : `${k}${sfx}`;
|
|
71
|
+
});
|
|
62
72
|
return `[{${parts.join(', ')}}]`;
|
|
63
73
|
}
|
|
64
74
|
// Simple typed arrays (string[], number[]) — usually obvious
|