asrai-mcp 0.5.8 → 0.6.0
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/server.js +1 -1
- package/src/tools.js +7 -7
package/package.json
CHANGED
package/src/server.js
CHANGED
|
@@ -71,7 +71,7 @@ async function handleTool(name, args) {
|
|
|
71
71
|
export function createServer() {
|
|
72
72
|
const server = new Server(
|
|
73
73
|
{ name: "asrai", version: "0.5.5" },
|
|
74
|
-
{ capabilities: { tools: {} }
|
|
74
|
+
{ capabilities: { tools: {} } }
|
|
75
75
|
);
|
|
76
76
|
|
|
77
77
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
|
package/src/tools.js
CHANGED
|
@@ -78,13 +78,13 @@ async function _post(path, body) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
async function _gather(...paths) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return
|
|
81
|
+
const entries = await Promise.all(
|
|
82
|
+
paths.map(async (path) => {
|
|
83
|
+
try { return [path, await _get(path)]; }
|
|
84
|
+
catch (e) { return [path, String(e)]; }
|
|
85
|
+
})
|
|
86
|
+
);
|
|
87
|
+
return Object.fromEntries(entries);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// ── Shared handlers (from tool-endpoints.js) ──────────────────────────────────
|