pub struct ToolsClient { /* private fields */ }Expand description
ctx.tools — the plugin’s MCP tools.
The host routes an MCP tools/call for one of the plugin’s declared tools
to the live plugin as a tool.invoke request (gated on mcp.expose); the
registered handler runs it and its result is the reply.
Implementations§
Source§impl ToolsClient
impl ToolsClient
Sourcepub fn serve(&self, handler: ToolHandler)
pub fn serve(&self, handler: ToolHandler)
Answer every tool.invoke with handler. Registration is local: no
host request is made.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ToolsClient
impl !UnwindSafe for ToolsClient
impl Freeze for ToolsClient
impl Send for ToolsClient
impl Sync for ToolsClient
impl Unpin for ToolsClient
impl UnsafeUnpin for ToolsClient
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