toolmenu 0.25.0 → 0.25.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/README.md +15 -4
- package/dist/apps.js +4 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/niksa90/toolmenu/main/docs/logo.svg" width="120" height="120" alt="toolmenu logo: a plug with a list of tools, one checked">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">toolmenu</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>Checks for MCP servers' tool lists: changes that confuse agents, break prompt caches or break clients, caught before your users hit them.</b>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
2
12
|
|
|
3
13
|
[](https://www.npmjs.com/package/toolmenu)
|
|
4
14
|
[](https://github.com/niksa90/toolmenu/actions/workflows/ci.yml)
|
|
5
15
|
[](https://github.com/niksa90/toolmenu/blob/main/LICENSE)
|
|
6
16
|
[](https://modelcontextprotocol.io)
|
|
7
17
|
[](https://github.com/niksa90/toolmenu)
|
|
18
|
+
[](https://glama.ai/mcp/servers/niksa90/toolmenu)
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
</p>
|
|
10
21
|
|
|
11
22
|
Your MCP server's tool list is the menu every agent reads before it does anything.
|
|
12
23
|
toolmenu checks that menu the way clients and agents will meet it: across calls,
|
|
@@ -205,7 +216,7 @@ jobs:
|
|
|
205
216
|
- uses: actions/setup-node@v7
|
|
206
217
|
with: { node-version: 22 }
|
|
207
218
|
- run: npm ci && npm run build
|
|
208
|
-
- uses: niksa90/toolmenu@v0.25.
|
|
219
|
+
- uses: niksa90/toolmenu@v0.25.1
|
|
209
220
|
with:
|
|
210
221
|
command: node dist/server.js
|
|
211
222
|
baseline: menu.json # your committed snapshot
|
|
@@ -253,7 +264,7 @@ permissions:
|
|
|
253
264
|
security-events: write # to upload SARIF
|
|
254
265
|
steps:
|
|
255
266
|
# … checkout, build, as above
|
|
256
|
-
- uses: niksa90/toolmenu@v0.25.
|
|
267
|
+
- uses: niksa90/toolmenu@v0.25.1
|
|
257
268
|
with:
|
|
258
269
|
command: node dist/server.js
|
|
259
270
|
sarif: toolmenu-sarif
|
package/dist/apps.js
CHANGED
|
@@ -47,6 +47,8 @@ export function agentMenu(menu) {
|
|
|
47
47
|
const tokens = tools.reduce((n, t) => n + t.tokens, 0);
|
|
48
48
|
return { shown: { ...menu, tools, totalTokens: tokens }, appOnly: { tools: menu.tools.length - tools.length, tokens: menu.totalTokens - tokens } };
|
|
49
49
|
}
|
|
50
|
+
/** Below this much time left before the deadline, a read isn't started. */
|
|
51
|
+
const MIN_READ_MS = 10;
|
|
50
52
|
/**
|
|
51
53
|
* Read each `ui://` resource the menu's tools name (resources/read: a read, not a tool
|
|
52
54
|
* call), at most `limit` of them. Each is read once, however many tools name it.
|
|
@@ -66,7 +68,8 @@ export async function readAppResources(connection, tools, timeoutMs = 30_000, li
|
|
|
66
68
|
const readOne = async (i) => {
|
|
67
69
|
const [uri, names] = queue[i];
|
|
68
70
|
const left = deadline - Date.now();
|
|
69
|
-
|
|
71
|
+
// A read given a few milliseconds can only time out: past the deadline in all but name.
|
|
72
|
+
if (left < MIN_READ_MS) {
|
|
70
73
|
out[i] = { uri, tools: names, error: `not read: the reads took longer than ${Math.round((2 * timeoutMs) / 1000)} s in all` };
|
|
71
74
|
return;
|
|
72
75
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toolmenu",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.1",
|
|
4
|
+
"mcpName": "io.github.niksa90/toolmenu",
|
|
4
5
|
"description": "Lint your MCP server's tool menu for changes that confuse agents or break caches.",
|
|
5
6
|
"author": "Nikša Perović (https://niksa.me)",
|
|
6
7
|
"main": "dist/index.js",
|