pub struct ParamSpec {
pub name: String,
pub ty: String,
pub required: bool,
pub description: String,
pub schema: Option<Value>,
}Expand description
One declared parameter of a script tool.
Fields§
§name: StringParameter name (the key the script reads from params).
ty: StringJSON-schema type: string, integer, number, boolean, array, object.
Ignored when schema is set.
required: boolWhether the model must supply this parameter.
description: StringHuman description shown to the model. Ignored when schema
is set (the raw fragment supplies its own).
schema: Option<Value>An optional raw JSON-Schema fragment for this parameter, used verbatim as
the property’s schema instead of the flat { type, description }. Lets a
tool.toml author express what annotations can’t - enums, array items,
numeric bounds, nested object shapes, formats, defaults - matching the
richness built-in and MCP tools advertise. None = the flat default.
Trait Implementations§
impl StructuralPartialEq for ParamSpec
Auto Trait Implementations§
impl Freeze for ParamSpec
impl RefUnwindSafe for ParamSpec
impl Send for ParamSpec
impl Sync for ParamSpec
impl Unpin for ParamSpec
impl UnsafeUnpin for ParamSpec
impl UnwindSafe for ParamSpec
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