pub struct ToolCallRequest {
pub name: String,
pub arguments: Value,
pub tool_call_id: Option<String>,
pub progress_token: Option<Value>,
pub call_key: Option<String>,
pub schema_pin: Option<String>,
}Expand description
A tool invocation as carried on a route REQUEST frame.
Fields§
§name: StringThe provider’s bare manifest tool name (no gateway prefix).
arguments: ValueThe arguments exactly as the caller supplied them; consumers never translate them, and the provider’s manifest schema is what accepts or rejects their shape.
tool_call_id: Option<String>The consumer’s own identifier for this call, minted by whatever dispatched it (a model runner’s WAL intent id, a gateway request id). Opaque to the daemon and to subc; unique per call on the consumer’s side, so a provider’s at-most-once fence can key on it directly instead of synthesizing an id from the call’s contents.
None is a statement about the PRODUCER, not the call: it means this
consumer did not supply an id, never that the call has no identity.
A reader must not collapse the two — the moment a legacy producer is
on the other end, treating None as “no id exists” and synthesizing
one silently reproduces exactly the failure this field exists to end.
A reader that synthesizes a fallback id when this is None must
record that the fallback fired (a fallback that never reports firing
is indistinguishable from a working component that is quietly wrong).
progress_token: Option<Value>An MCP progress token the consumer wants progress notifications correlated to, when the caller requested progress. Opaque here.
call_key: Option<String>A key the consumer chose for this call, which a provider may use to
recognise the same call arriving twice. Opaque to the daemon; a
provider checks only its shape, with validate_call_key, and answers
a malformed one with invalid_request naming the field
CALL_KEY_FIELD.
This struct is deliberately not #[non_exhaustive]: a consumer that
builds it field by field must decide what key, if any, to send, so a
new field here is meant to stop its struct literal compiling.
schema_pin: Option<String>Which version of the tool’s schema the consumer built its arguments
against, so a provider can tell a call made against a schema it no
longer serves. Opaque here: the tool-provider role defines what it
holds. A provider checks only its shape, with validate_schema_pin,
and answers a malformed one with invalid_request naming the field
SCHEMA_PIN_FIELD.