pub struct CallToolRequestParams {
pub name: String,
pub arguments: Option<HashMap<String, Value>>,
pub input_responses: Option<HashMap<String, InputResponse>>,
pub request_state: Option<String>,
pub meta: RequestMetaObject,
}Expand description
Parameters for tools/call request — CallToolRequestParams extends InputResponseRequestParams. Carries the SEP-2322 multi-round-trip mixin
(inputResponses?, requestState?) in addition to the tool-call-specific
name and arguments.
Fields§
§name: StringName of the tool to call.
arguments: Option<HashMap<String, Value>>Arguments to pass to the tool — { [key: string]: unknown }.
input_responses: Option<HashMap<String, InputResponse>>Responses to a prior InputRequiredResult (mixin from
InputResponseRequestParams).
request_state: Option<String>Verbatim echo of InputRequiredResult.requestState (mixin).
meta: RequestMetaObjectSchema-typed _meta per RequestMetaObject. Required per schema
(CallToolRequestParams extends InputResponseRequestParams extends RequestParams,
and RequestParams._meta is required in 2026-07-28 stateless core).
Implementations§
Source§impl CallToolRequestParams
impl CallToolRequestParams
Sourcepub fn new(
name: impl Into<String>,
meta: RequestMetaObject,
) -> CallToolRequestParams
pub fn new( name: impl Into<String>, meta: RequestMetaObject, ) -> CallToolRequestParams
Construct with the required _meta and tool name.
Sourcepub fn with_input_responses(
self,
responses: HashMap<String, InputResponse>,
request_state: impl Into<String>,
) -> CallToolRequestParams
pub fn with_input_responses( self, responses: HashMap<String, InputResponse>, request_state: impl Into<String>, ) -> CallToolRequestParams
Attach prior InputRequiredResult responses + verbatim state echo.
Sourcepub fn get_arguments(&self) -> Option<&HashMap<String, Value>>
pub fn get_arguments(&self) -> Option<&HashMap<String, Value>>
Get arguments as HashMap - CRITICAL: Use this instead of the trait method The trait method has limitations due to lifetime issues with HashMap->Value conversion
Sourcepub fn get_arguments_as_value(&self) -> Option<Value>
pub fn get_arguments_as_value(&self) -> Option<Value>
Get arguments as Value (converted from HashMap)
pub fn with_arguments( self, arguments: HashMap<String, Value>, ) -> CallToolRequestParams
pub fn with_arguments_value(self, arguments: Value) -> CallToolRequestParams
pub fn with_meta(self, meta: RequestMetaObject) -> CallToolRequestParams
Trait Implementations§
Source§impl Clone for CallToolRequestParams
impl Clone for CallToolRequestParams
Source§fn clone(&self) -> CallToolRequestParams
fn clone(&self) -> CallToolRequestParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more