ReadonlyinputValidated tool input
Already validated against tool's input schema. Immutable - middleware should not modify.
ReadonlymetadataClient-provided metadata
Includes locale, userAgent, userLocation, subject, etc. Immutable - set by client, middleware should not modify.
ReadonlystateRequest-scoped shared state
Mutable Map for sharing data between middleware and tool handler. Isolated per request - not shared across requests.
ReadonlytoolName of the tool being invoked
Immutable - set by framework before middleware chain.
Context object passed through middleware chain
Immutable properties provide request info, mutable
stateMap allows middleware to share data with downstream middleware and tool handlers.