lib.rsannotatedlib.rssource19 lines · 817 B · raw
1//! The estate's MCP layer over `rmcp`.
2//!
3//! A project depends on this crate and never names `rmcp`, so the SDK's
4//! version, fork and features are decided in one place
5//! (`~/rustcrates/Cargo.toml`).
6//!
7//! [`CommandServer`] is the first shared piece: it serves a project's
8//! existing command enum as MCP tools by reflection. Derive
9//! [`schemars::JsonSchema`] on a serde enum tagged by a field, hand over one
10//! function that runs a command, and every variant is a tool: its doc comment
11//! is the description and its fields are the arguments. A variant added to
12//! the enum is a tool with no MCP code written for it.
13
14mod reflect;
15mod server;
16
17pub use reflect::{CommandTool, ReflectError, command_from_call, command_tools};
18pub use schemars;
19pub use server::{CommandServer, ServeError, ServerIdentity};