@vantageos/mcp-doctor 0.11.0 → 0.11.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/CHANGELOG.md +18 -0
- package/README.md +2 -0
- package/dist/doctor.js +31 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to `@vantageos/mcp-doctor` are documented here.
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 0.11.1 — 2026-10-29
|
|
7
|
+
|
|
8
|
+
Patch: a safety fix in the runtime introspector. No rule, verdict form or public type changes.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **The introspector never calls a tool that is not declared read-only.** With `--url` the doctor reaches a live
|
|
12
|
+
server, and the C-11 cursor probe sent `tools/call` to EVERY served tool whose `inputSchema` takes a `cursor`,
|
|
13
|
+
read-only or not. Every `tools/call` the introspector sends (the C-11 cursor probe and the S-2 safe call) is now
|
|
14
|
+
decided by one rule: the tool declares `annotations.readOnlyHint: true`, its `inputSchema` is an object, and its
|
|
15
|
+
`inputSchema.required` is absent or an array of strings naming nothing beyond the arguments the probe supplies.
|
|
16
|
+
Any other tool is recorded as `not-sent` with a reason naming the field (`not declared read-only
|
|
17
|
+
(annotations.readOnlyHint is not true)`, `inputSchema.required is malformed (<type>): the probe never guesses`,
|
|
18
|
+
`the tool requires <names> beside the cursor`), and no request is made. C-11 then reads `could-not-judge` for that
|
|
19
|
+
tool, naming the reason.
|
|
20
|
+
- S-2 safe call: a read-only tool whose `required` is malformed (a string, an object, `null`, an array with a
|
|
21
|
+
non-string member) or whose `inputSchema` is not an object was read as "no required argument" and called with `{}`.
|
|
22
|
+
It is no longer chosen.
|
|
23
|
+
|
|
6
24
|
## 0.11.0 — 2026-10-29
|
|
7
25
|
|
|
8
26
|
Minor, not a patch: six rules that `--url` did not run now run, and rules that were `could-not-judge` or
|
package/README.md
CHANGED
|
@@ -253,6 +253,8 @@ bound or a typed error can now turn red on S-38 or S-39, where 0.8.x said nothin
|
|
|
253
253
|
|
|
254
254
|
**C-11 (b)** dynamic: an invalid cursor is sent to each protocol list method (`-32602`) and as the cursor
|
|
255
255
|
argument of each tool that takes one (`isError: true`, `structuredContent.error.code` = `invalid_cursor`).
|
|
256
|
+
A tool is called only when it declares `readOnlyHint: true` and its `inputSchema.required` is well-formed and
|
|
257
|
+
names nothing but `cursor`; any other tool is not called, and C-11 names why (could-not-judge for that tool).
|
|
256
258
|
**C-9** accepts `prepare` (a read verb). **C-13** reads the ceiling from the server manifest's
|
|
257
259
|
`contextCeiling` as well as from a source constant. **S-22** resolves an `allowedOrigins` element held by a
|
|
258
260
|
same-file const. **DLocalIdentity** does not count a hash over local file content. **D3 / D4** attribute a
|
package/dist/doctor.js
CHANGED
|
@@ -22007,6 +22007,30 @@ const onMessage = (msg) => {
|
|
|
22007
22007
|
if (settled) return;
|
|
22008
22008
|
const served = msg.result && Array.isArray(msg.result.tools) ? msg.result.tools : [];
|
|
22009
22009
|
const schemaOf = (t) => (t && t.inputSchema && typeof t.inputSchema === "object" ? t.inputSchema : {});
|
|
22010
|
+
// The ONE rule deciding whether the introspector may send tools/call to a served tool. Both call
|
|
22011
|
+
// sites (the S-2 safe call and the C-11 cursor probe) go through it; there is no second copy. With
|
|
22012
|
+
// --url the call reaches a LIVE server, so a call is made only to a tool the server itself declares
|
|
22013
|
+
// read-only, whose inputSchema.required is readable and names nothing beyond the arguments the probe
|
|
22014
|
+
// supplies. Every other form is refused, naming the field: the probe never guesses.
|
|
22015
|
+
const kindOf = (v) => (v === null ? "null" : Array.isArray(v) ? "array" : typeof v);
|
|
22016
|
+
const callability = (t, supplied) => {
|
|
22017
|
+
const ann = t && t.annotations;
|
|
22018
|
+
if (!ann || typeof ann !== "object" || ann.readOnlyHint !== true)
|
|
22019
|
+
return { callable: false, reason: "not declared read-only (annotations.readOnlyHint is not true)" };
|
|
22020
|
+
const schema = t.inputSchema;
|
|
22021
|
+
if (schema !== undefined && (schema === null || typeof schema !== "object" || Array.isArray(schema)))
|
|
22022
|
+
return { callable: false, reason: "inputSchema is malformed (" + kindOf(schema) + "): the probe never guesses" };
|
|
22023
|
+
const required = schema === undefined ? undefined : schema.required;
|
|
22024
|
+
if (required === undefined) return { callable: true };
|
|
22025
|
+
if (!Array.isArray(required))
|
|
22026
|
+
return { callable: false, reason: "inputSchema.required is malformed (" + kindOf(required) + "): the probe never guesses" };
|
|
22027
|
+
if (required.some((r) => typeof r !== "string"))
|
|
22028
|
+
return { callable: false, reason: "inputSchema.required is malformed (array with a non-string member): the probe never guesses" };
|
|
22029
|
+
const beyond = required.filter((r) => !supplied.includes(r));
|
|
22030
|
+
if (beyond.length > 0)
|
|
22031
|
+
return { callable: false, reason: "the tool requires " + beyond.join(", ") + (supplied.length > 0 ? " beside the " + supplied.join(", ") : "") + "; the probe never invents a value for them" };
|
|
22032
|
+
return { callable: true };
|
|
22033
|
+
};
|
|
22010
22034
|
const takesCursor = (t) => {
|
|
22011
22035
|
const props = schemaOf(t).properties;
|
|
22012
22036
|
return Boolean(props && typeof props === "object" && Object.prototype.hasOwnProperty.call(props, "cursor"));
|
|
@@ -22026,10 +22050,10 @@ const onMessage = (msg) => {
|
|
|
22026
22050
|
listPending.set(lid, rec);
|
|
22027
22051
|
send({ jsonrpc: "2.0", id: lid, method: m, params: {} });
|
|
22028
22052
|
}
|
|
22029
|
-
// S-2 is verified "on the response returned" to a tool call: ONE tool
|
|
22030
|
-
//
|
|
22031
|
-
//
|
|
22032
|
-
const safe = served.find((t) =>
|
|
22053
|
+
// S-2 is verified "on the response returned" to a tool call: ONE tool that callability() admits
|
|
22054
|
+
// with no argument supplied is called with {}; only the KEYS of its result are recorded, never its
|
|
22055
|
+
// content. No such tool: no call is invented.
|
|
22056
|
+
const safe = served.find((t) => callability(t, []).callable);
|
|
22033
22057
|
if (safe) {
|
|
22034
22058
|
const cid = nextId++;
|
|
22035
22059
|
const rec = { method: "tools/call " + String(safe.name) };
|
|
@@ -22041,9 +22065,9 @@ const onMessage = (msg) => {
|
|
|
22041
22065
|
for (const t of served) {
|
|
22042
22066
|
if (!takesCursor(t)) continue;
|
|
22043
22067
|
const name = String(t && t.name);
|
|
22044
|
-
const
|
|
22045
|
-
if (
|
|
22046
|
-
probes.push({ target: name, surface: "tool-argument", outcome: { kind: "not-sent", reason:
|
|
22068
|
+
const gate = callability(t, ["cursor"]);
|
|
22069
|
+
if (!gate.callable) {
|
|
22070
|
+
probes.push({ target: name, surface: "tool-argument", outcome: { kind: "not-sent", reason: gate.reason } });
|
|
22047
22071
|
continue;
|
|
22048
22072
|
}
|
|
22049
22073
|
probe(name, "tool-argument", "tools/call", { name, arguments: { cursor: INVALID_CURSOR } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vantageos/mcp-doctor",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Static MCP conformance checker: audits an MCP server source tree against the MCP 2026-07-28 standard and emits a conformance-diff table (file:line | present | absent | non-conforming | verdict).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/doctor.js",
|