# Transport headers

Canonical URL: https://developers.iagenify.com/sdk/mcp/transport-headers/
Language: en

Some tools declare that an argument must travel as an HTTP header. The rules are narrow, and a definition that breaks them is invalid rather than merely awkward.

Status: declared in the schema · statically reachable only · ASCII or encoded

## What they are for {#what}

Intermediaries — gateways, routers — read headers without opening the body. A tool can therefore declare that one of its parameters belongs in a header, and the specification also requires a header naming the server on certain methods.

## Only along a direct chain of properties {#reachable}

> **An annotation under a branching construct makes the definition invalid**
>
> If it sits under an array's items, or under a construct that could take one of several shapes, there is no single path to read in the arguments — so there is no way to know which value to put in the header. The specification calls such a tool invalid, and it is rejected with that reason rather than guessed at.

## What a header value may contain {#values}

| Value | Sent as |
| --- | --- |
| Plain visible ASCII, no surrounding spaces | itself |
| Anything else — accents, newlines, control characters | encoded behind the sentinel the specification defines |
| Plain ASCII that *looks like* the sentinel | **encoded too** |

The last row is the subtle one: a value that already resembles the encoding marker would be decoded by the server into something other than what the body carries — exactly the mismatch the protocol has an error code for.

## A mismatch is reported precisely {#mismatch}

A modern server answering that the header does not match the body is saying something specific. It is not a reason to retry with an older handshake, which would replace the real cause with a different one.

## If you call the client yourself {#yours}

Pass the tool's recorded `schema` to [call()](/sdk/ref/mcp-client/call). Without it an annotated argument stays in the body and the server refuses. [api.mcp.call()](/sdk/ref/mcp/call) does this for you.

- [call()](/sdk/ref/mcp-client/call): Where the schema is passed.
- [rejectedTools](/sdk/ref/mcp-client/discovered): What is refused, and why.
