Expand description
Tool — the only side-effectful interface available to skills and agents.
A Tool is a typed, named, async function with a JSON-Schema-compatible
signature. Two transports satisfy the trait today: LocalTool (a closure
over a Rust async fn) and — under the mcp feature in a later phase — a
remote MCP server. Skills never know the difference.
Structs§
- Local
Tool - Adapter that turns any
async Fn(Value) -> Result<Value, KernelError>into aTool. Hosts can use this to surface existing async functions to the kernel without writing a dedicated tool type. - Omitted
Segment - One omitted payload segment and its opaque continuation token.
- Redaction
Policy - JSON Pointer redaction policy for tool results.
- Redaction
Rule - One JSON Pointer redaction rule.
- Tool
Result Envelope - Tool result plus deterministic truncation metadata.
- Tool
Result Envelope Config - Configuration for bounding large tool results before they enter a model turn, trace record, or MCP response cache.
- Tool
Result Page Token - Decoded continuation token metadata for a bounded tool result segment.
- Tool
Schema - Lightweight description of a tool’s I/O contract. The
args_schemaandresult_schemaare JSON-Schema fragments; the LLM-facing rendering layer uses them to generaterig/ MCP tool definitions automatically. We do not validate against them at the kernel — validation is the tool’s responsibility — but downstream MCP exporters need them.
Enums§
- Tool
Result Omission Reason - Reason an individual payload segment was omitted from a tool result envelope.
Traits§
- Tool
- A composable, side-effectful capability.
Functions§
- bound_
tool_ result - Bound
payloadwith the defaultToolResultEnvelopeConfig. - decode_
tool_ result_ page_ token - Decode a
ToolResultEnvelopepage token produced by this crate.
Type Aliases§
- Tool
Name - Stable, registry-unique identifier for a tool (e.g.
"grammar.query","memory.lookup","sampler.expand").