await client.initialize();
const tools = await client.listTools();
console.log(client.protocolVersion); // the revision both sides agreed on
console.log(client.rejectedTools); // [{ name, reason }]client.initialize()
tools = client.list_tools()
print(client.protocol_version) # the revision both sides agreed onWhy a tool is rejected
| Reason | Means |
|---|---|
| An unusable name | Nothing survives the prefixing and trimming. |
| A header annotation that cannot be read | It sits under a construct that could branch, so there is no single path to read in the arguments — the specification calls such a definition invalid. |
A rejected tool is named, not hidden
Dropping it in silence would leave a server's own documentation promising a tool that never appears, with nothing to point at. The reason is the thing to send to whoever operates the server.
protocolVersion is the agreed one
Not what this client prefers and not what the server prefers — what both know. It is recorded on a connection, and visible in list().
Surfacing it
if (client.rejectedTools.length) {
console.warn("not declarable:", client.rejectedTools.map((t) => `${t.name} (${t.reason})`).join(", "));
}# The Python client returns every tool the server lists; check each schema yourself
from iagenify import sanitize_schema
declarable = [t for t in tools if sanitize_schema(t.get("inputSchema") or {}).get("type") == "object"]
skipped = [t["name"] for t in tools if t not in declarable]
if skipped:
print("not declarable:", ", ".join(skipped))