# discovered · rejectedTools

Canonical URL: https://developers.iagenify.com/sdk/ref/mcp-client/discovered/
Language: en

What the handshake learned about the server, and which of its tools could not be declared — named, rather than quietly dropped.

Status: read after initialize · rejections are named · invalid definitions

```javascript
await client.initialize();
const tools = await client.listTools();

console.log(client.protocolVersion);   // the revision both sides agreed on
console.log(client.rejectedTools);     // [{ name, reason }]
```

## Why a tool is rejected {#why-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 {#protocol}

Not what this client prefers and not what the server prefers — what both know. It is recorded on a connection, and visible in [list()](/sdk/ref/mcp/list).

## Surfacing it {#surfacing}

```javascript
if (client.rejectedTools.length) {
  console.warn("not declarable:", client.rejectedTools.map((t) => `${t.name} (${t.reason})`).join(", "));
}
```

- [listTools()](/sdk/ref/mcp-client/list-tools): Where rejections happen.
- [Protocol revision](/sdk/mcp/protocol-revision): The negotiation.

```python
client.initialize()
tools = client.list_tools()

print(client.protocol_version)   # the revision both sides agreed on
```

```python
# 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))
```
