pub struct Tool {
pub name: String,
pub description: Option<String>,
pub input_schema: Value,
pub action: Option<String>,
pub autosubmit: bool,
pub extra: BTreeMap<String, Value>,
}Expand description
An agent-callable tool a page declared, as reported by WebMCP.listTools.
The typed fields cover the standard WebMCP tool descriptor. Anything else
the server includes is kept verbatim in Tool::extra, so no data is
lost and future server additions do not break older clients.
Fields§
§name: StringThe tool’s unique name, used to invoke it.
description: Option<String>Human/agent readable description of what the tool does.
input_schema: ValueJSON Schema describing the tool’s arguments. Kept as raw JSON since it is an arbitrary schema object.
action: Option<String>Target action associated with a declaratively-declared tool (e.g. a form action). Omitted on the wire when absent.
autosubmit: boolWhether the underlying action may be auto-submitted when the tool is invoked (declarative tools).
extra: BTreeMap<String, Value>Any additional fields the server reported, preserved losslessly and opaquely (round-trips on re-serialization).