Skip to main content

MCPTool

Defined in the MCP module.
Rust AI Agent SDK An MCP tool definition.

Fields

NameTypeDescription
nameStringTool name
descriptionStringTool description
input_schemaserde_json::ValueInput schema (JSON Schema)

Methods

new

fn new(name: impl Into<String>, description: impl Into<String>) -> Self
Create a new MCP tool Parameters:
NameType
nameimpl Into&lt;String&gt;
descriptionimpl Into&lt;String&gt;

input_schema

fn input_schema(mut self, schema: serde_json::Value) -> Self
Set input schema Parameters:
NameType
schemaserde_json::Value

Source

View on GitHub

praisonai/src/mcp/mod.rs at line 263