Skip to main content

Module traits

Module traits 

Source
Expand description

Trait definitions for MCP server tools. The SqliteServerTool trait provides a structured way to define tools with typed input, output, and error types. Implementors declare their schema statically and provide a synchronous handler; the trait takes care of generating the rmcp Tool definition, JSON schemas, and the routing closure.

Traits§

SqliteServerTool
A statically-typed MCP tool backed by a SQLite server. Each implementor represents a single tool exposed to MCP clients. The trait derives the tool’s JSON schema from its associated types and wires up a handler closure compatible with the rmcp ToolRouter.