| Crates.io | hanzo-mcp-types |
| lib.rs | hanzo-mcp-types |
| version | 0.6.0 |
| created_at | 2026-01-25 20:32:39.422736+00 |
| updated_at | 2026-01-25 20:32:39.422736+00 |
| description | MCP (Model Context Protocol) type definitions for Hanzo AI agents |
| homepage | https://github.com/hanzoai/dev/tree/main/mcp-types |
| repository | https://github.com/hanzoai/dev |
| max_upload_size | |
| id | 2069485 |
| size | 240,581 |
Rust type definitions for the Model Context Protocol (MCP).
This crate provides strongly-typed Rust definitions for all MCP protocol messages, enabling type-safe communication between AI agents and tool servers.
[dependencies]
hanzo-mcp-types = "0.6"
use mcp_types::{
CallToolRequest, CallToolResult, ListToolsRequest, ListToolsResult,
Tool, ToolInfo, Content, TextContent,
};
// Define a tool
let tool = Tool {
name: "read_file".to_string(),
description: Some("Read contents of a file".to_string()),
input_schema: serde_json::json!({
"type": "object",
"properties": {
"path": {"type": "string"}
},
"required": ["path"]
}),
};
// Create a tool call request
let request = CallToolRequest {
name: "read_file".to_string(),
arguments: Some(serde_json::json!({"path": "src/main.rs"})),
};
| Type | Description |
|---|---|
Tool |
Tool definition with name, description, and JSON schema |
CallToolRequest |
Request to execute a tool |
CallToolResult |
Result from tool execution |
ListToolsRequest |
Request to list available tools |
ListToolsResult |
List of available tools |
Content |
Tool output content (text, image, resource) |
Resource |
External resource reference |
Prompt |
Prompt template definition |
This crate implements MCP specification version 2025-06-18.
hanzo-mcp-client - Async MCP clienthanzo-protocol - Core protocol typeshanzo-zap - Zero-copy Agent ProtocolMIT License - Copyright 2025 Hanzo AI Inc.