pub struct McpResourceTool { /* private fields */ }Expand description
One of list_mcp_resources, list_mcp_resource_templates and
read_mcp_resource, which take a server argument and reach every
connected server with resources.
Trait Implementations§
Source§impl Tool for McpResourceTool
impl Tool for McpResourceTool
Source§fn declaration(&self) -> &ToolDeclaration
fn declaration(&self) -> &ToolDeclaration
Name, description and argument schema as sent to the model.
Source§fn output_schema(&self) -> Option<&Value>
fn output_schema(&self) -> Option<&Value>
JSON Schema of the value the tool returns as
structuredContent, for
tools whose results scripts consume (pi’s outputSchema).Source§fn execute(
&self,
_call_id: String,
args: Value,
cancel: CancellationToken,
_updates: UpdateSink,
) -> BoxFuture<'_, Result<ToolResult, String>>
fn execute( &self, _call_id: String, args: Value, cancel: CancellationToken, _updates: UpdateSink, ) -> BoxFuture<'_, Result<ToolResult, String>>
Runs the tool with validated arguments.
Source§fn execution_mode(&self) -> ExecutionMode
fn execution_mode(&self) -> ExecutionMode
See
ExecutionMode.Auto Trait Implementations§
impl !RefUnwindSafe for McpResourceTool
impl !UnwindSafe for McpResourceTool
impl Forget for McpResourceTool
impl Freeze for McpResourceTool
impl Send for McpResourceTool
impl Sync for McpResourceTool
impl Unpin for McpResourceTool
impl UnsafeUnpin for McpResourceTool
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