pub struct Tool {
pub name: &'static str,
pub feature: Feature,
pub description: Option<String>,
pub input: Arc<JsonObject>,
pub output: Option<Arc<JsonObject>>,
pub long: bool,
pub ui: Option<&'static str>,
pub app_only: bool,
pub hints: Option<Hints>,
pub looks: Looks,
}Expand description
An operation as callers see it.
Fields§
§name: &'static str§feature: Feature§description: Option<String>The arguments type’s doc comment.
input: Arc<JsonObject>§output: Option<Arc<JsonObject>>Absent when the result is not a JSON object, which MCP’s structured output cannot describe.
long: boolRuns as a task for callers that support tasks.
ui: Option<&'static str>The MCP App that shows this tool’s results: a ui:// resource.
app_only: boolCalled by an MCP App only, such as an undo button, and kept from the model.
hints: Option<Hints>What a host may assume about the tool, when the module says.
looks: LooksTrait Implementations§
Auto Trait Implementations§
impl Forget for Tool
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
impl UnwindSafe 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