pub trait TaskAugmentedRequestParamsMeta: RequestParamsMeta {
// Required methods
fn task(&self) -> Option<&JsonObject>;
fn task_mut(&mut self) -> &mut Option<JsonObject>;
// Provided method
fn set_task(&mut self, task: JsonObject) { ... }
}Expand description
Trait for task-augmented request params that contain both _meta and task fields.
Per the MCP 2025-11-25 spec, certain requests (like tools/call and sampling/createMessage)
can include a task field to signal that the caller wants task-augmented execution.
Required Methods§
Sourcefn task(&self) -> Option<&JsonObject>
fn task(&self) -> Option<&JsonObject>
Get a reference to the task field
Sourcefn task_mut(&mut self) -> &mut Option<JsonObject>
fn task_mut(&mut self) -> &mut Option<JsonObject>
Get a mutable reference to the task field
Provided Methods§
Sourcefn set_task(&mut self, task: JsonObject)
fn set_task(&mut self, task: JsonObject)
Set the task field