MCP Tool • Rust AI Agent SDK

MCPTool: An MCP tool definition.

MCPTool

Defined in the MCP module.

Rust AI Agent SDK

An MCP tool definition.

Diagram

uses

returns

Agent

Tool: MCPTool

Result

Fields

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

Methods

new

rust
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

rust
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


Related Documentation