pub struct ToolDefinition {
pub name: String,
pub description: String,
pub input_schema: Value,
pub annotations: Option<ToolAnnotations>,
}Expand description
MCP tool definition — wire-shape mirror of
yeti_mcp_domain::types::ToolDefinition.
Kept here so wasm plugin-apps can construct tool definitions
against yeti_sdk::prelude::plugins::mcp::ToolDefinition without
pulling in yeti-mcp-domain (which is request-band and not part of
the SDK surface). yeti-mcp converts to/from the domain type at the
dispatch boundary.
Bincode is the on-the-wire format for the hook bridge.
We intentionally do not use #[serde(skip_serializing_if)] /
#[serde(rename_all)] here — bincode is a positional binary
format and omitting fields on serialize but expecting them on
deserialize is a decode error. The JSON-friendly attributes live
on the domain-side yeti_mcp_domain::types::ToolDefinition and
are applied at the dispatch boundary in
yeti_mcp::dev_resource::ext_tool_to_rmcp.
Fields§
§name: StringTool name (e.g. "yeti_hello", "widgets_list").
description: StringHuman-readable tool description shown in MCP clients.
input_schema: ValueJSON Schema describing the tool’s arguments. Most tools use
an object schema ({"type": "object", "properties": { ... }}).
Stored as serde_json::Value for ergonomic in-process use; on
the bincode wire it serializes as a JSON string to dodge
DeserializeAnyNotSupported.
annotations: Option<ToolAnnotations>Optional MCP-2025-03-26 behavior hints. None is equivalent
to “all hints unset.”
Trait Implementations§
Source§impl Clone for ToolDefinition
impl Clone for ToolDefinition
Source§fn clone(&self) -> ToolDefinition
fn clone(&self) -> ToolDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more