pub struct Definition {
pub name: String,
pub description: String,
pub input_schema: ToolSchema,
pub output_schema: Option<ToolSchema>,
pub annotations: Annotations,
pub envelope: Envelope,
}Expand description
Describes a tool — MCP-aligned metadata.
Fields§
§name: StringUnique tool identifier.
description: StringHuman-readable description.
input_schema: ToolSchemaJSON Schema for the tool’s input parameters.
output_schema: Option<ToolSchema>Optional JSON Schema for the tool’s output.
annotations: AnnotationsBehavioral hints that are orthogonal to the executable permission envelope.
envelope: EnvelopeExecutable permission envelope — the single source of truth for what the tool may do at runtime. It carries scopes, network/filesystem/ subprocess rules, safety classification, sensitive-invocation predicates, and data-classification hints. Defaults deny network, filesystem, and subprocess access.
Trait Implementations§
Source§impl Clone for Definition
impl Clone for Definition
Source§fn clone(&self) -> Definition
fn clone(&self) -> Definition
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 Definition
impl Debug for Definition
Source§impl<'de> Deserialize<'de> for Definition
impl<'de> Deserialize<'de> for Definition
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
Source§impl PartialEq for Definition
impl PartialEq for Definition
Source§impl Serialize for Definition
impl Serialize for Definition
impl StructuralPartialEq for Definition
Auto Trait Implementations§
impl Freeze for Definition
impl RefUnwindSafe for Definition
impl Send for Definition
impl Sync for Definition
impl Unpin for Definition
impl UnsafeUnpin for Definition
impl UnwindSafe for Definition
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