oa::network::McpTool

Registered MCP tool definition.

StRust public API

Declaration

pub struct McpTool { pub name: String, pub title: String, pub description: String, pub input_schema_json: String, pub output_schema_json: String, pub read_only: bool, pub destructive: bool, pub idempotent: bool, pub open_world: bool, pub call: Box<dyn Fn(&McpArguments<'_>) -> Result<McpToolResult> + Send + Sync>, }
Public Rust declaration.

Associated Functions

pub fn new( name: impl Into<String>, call: impl Fn(&McpArguments<'_>) -> Result<McpToolResult> + Send + Sync + 'static, ) -> Self

Public Data Members

nameStringfield
titleStringfield
descriptionStringfield
input_schema_jsonStringfield
output_schema_jsonStringfield
read_onlyboolfield
destructiveboolfield
idempotentboolfield
open_worldboolfield
callBox<dyn Fn(&McpArguments<'_>) -> Result<McpToolResult> + Send + Sync>field

Public Method Documentation

pub fn new( name: impl Into<String>, call: impl Fn(&McpArguments<'_>) -> Result<McpToolResult> + Send + Sync + 'static ) -> Self
No public source comment is attached to this declaration.