Crig::Tool::ToolContext
Context passed to every tool execution.
Callers insert typed inbound values with #insert. Tools read those
values with #get or #require, and attach host-only result metadata
with #insert_result. Result hooks inspect that metadata through
#result. Neither inbound values nor result metadata are sent to the
model.
Dispatch clones inbound values once per call. Map-level mutations (inserting, replacing, or removing typed slots) affect only that execution.
Constructors
Instance methods
Publish metadata produced by one dispatch while preserving the caller's inbound values.
Build a fresh execution context with the same inbound values and no result metadata.
A context carrying only the inbound values, with no result metadata.
Used to hand the caller's inbound context to a sub-agent invoked as a
tool (upstream ToolContext::inbound_only).
Internal: construct with pre-populated inbound map.
Insert an inbound typed value, returning the displaced value if present.
Attach host-only metadata to this execution's result.
Require an inbound typed value, raising MissingToolContext if absent.