pub struct ToolDefinition {
pub id: ToolId,
pub name: String,
pub description: String,
pub input_schema: Value,
pub output_schema: Value,
pub compression_transforms: Vec<String>,
}Expand description
A tool definition with an id, name, and description.
Fields§
§id: ToolId§name: String§description: String§input_schema: ValueJSON Schema for the tool’s input parameters.
output_schema: ValueOptional JSON Schema describing the structure of a tool’s structured
output (see MCP spec outputSchema).
Per the MCP 2025-06-18 specification, when present this schema’s root
type MUST be "object" and servers MUST return structuredContent
matching the schema. Leave as Value::Null (the default) when the
tool returns plain text via the content field — strict clients such
as OpenCode validate this and will disable the whole server if a
scalar-typed schema is advertised (reported in issue #5).
compression_transforms: Vec<String>Description of what sqz does to this tool’s output.
Trait Implementations§
Source§impl Clone for ToolDefinition
impl Clone for ToolDefinition
Source§fn clone(&self) -> ToolDefinition
fn clone(&self) -> ToolDefinition
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ToolDefinition
impl Debug for ToolDefinition
Source§impl Default for ToolDefinition
impl Default for ToolDefinition
Source§fn default() -> ToolDefinition
fn default() -> ToolDefinition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ToolDefinition
impl<'de> Deserialize<'de> for ToolDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ToolDefinition
impl RefUnwindSafe for ToolDefinition
impl Send for ToolDefinition
impl Sync for ToolDefinition
impl Unpin for ToolDefinition
impl UnsafeUnpin for ToolDefinition
impl UnwindSafe for ToolDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more