pub trait Tool {
// Required methods
fn name(&self) -> Cow<'static, str>;
fn description(&self) -> Cow<'static, str>;
fn input_schema(&self) -> Cow<'static, str>;
fn annotations(&self) -> ToolAnnotations;
fn execute(
&self,
request: CallToolRequest,
) -> Pin<Box<dyn Future<Output = CallToolResult> + Send + '_>>;
}
Required Methods§
Sourcefn description(&self) -> Cow<'static, str>
fn description(&self) -> Cow<'static, str>
The description of the tool
Sourcefn input_schema(&self) -> Cow<'static, str>
fn input_schema(&self) -> Cow<'static, str>
The parameters of the tool
Sourcefn annotations(&self) -> ToolAnnotations
fn annotations(&self) -> ToolAnnotations
The annotations of the tool
Sourcefn execute(
&self,
request: CallToolRequest,
) -> Pin<Box<dyn Future<Output = CallToolResult> + Send + '_>>
fn execute( &self, request: CallToolRequest, ) -> Pin<Box<dyn Future<Output = CallToolResult> + Send + '_>>
Execute the tool