pub struct Tool {
pub name: String,
pub title: Option<String>,
pub description: String,
pub input_schema: Value,
pub annotations: Option<Value>,
pub handler: ToolHandler,
}Expand description
One MCP tool. handler gets the call’s arguments (an object, {} when
omitted). An Err is reported to the client as a tool result with
isError: true, as MCP specifies, not as a protocol error.
Fields§
§name: String§title: Option<String>§description: String§input_schema: Value§annotations: Option<Value>readOnlyHint, destructiveHint, idempotentHint, openWorldHint.
handler: ToolHandlerImplementations§
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Tool
impl !UnwindSafe for Tool
impl Freeze for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more