McpClient.paramHeaders

Compute the Mcp-Param-* headers to emit for a tools/call, given the tool's inputSchema and the call arguments. Uses the path-aware mcp.protocol.modern.paramHeaders, which discovers every valid x-mcp-header annotation at *any* nesting depth (not only top-level properties), and descends each annotation's path into the arguments object: for each path segment it indexes into the current Json object; if any intermediate node is absent, null, or not an object, the header is skipped (emitting none). When the full path resolves to a present, non-null primitive (string / int / bigInt / bool — number/float is already excluded by header validation), the value is encoded with encodeHeaderValue and emitted under ParamHeader.header. This preserves the spec's absent/null omission semantics (draft basic/transports mirroring table). Array-item paths (which cross an items schema) are not mirrored: a single repeated header name cannot unambiguously represent per-element values, so they are skipped — only the well-defined object-nesting case is handled. Separated as a pure static helper so the mirroring can be unit-tested without a live server.

class McpClient
package static @safe
string[string]
paramHeaders