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.
Fields
| Name | Type | Description |
|---|---|---|
name | String | Tool name |
description | String | Tool description |
input_schema | serde_json::Value | Input schema (JSON Schema) |
Methods
new
fn new(name: impl Into<String>, description: impl Into<String>) -> SelfCreate a new MCP tool
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
description | impl Into<String> |
input_schema
fn input_schema(mut self, schema: serde_json::Value) -> SelfSet input schema
Parameters:
| Name | Type |
|---|---|
schema | serde_json::Value |
Source
View on GitHubpraisonai/src/mcp/mod.rs at line 263