bluecollar

Tool result

What a tool hands back.

A ToolResult carries content, optional JSON data, attachments, resource effects and, on failure, a ToolFailure with a kind, a code, a stage and a summary safe to show a user. The kinds are dependency_unavailable, permission_denied, invalid_input, not_found, rate_limited, external_service, interaction_required, policy_blocked and unknown. A ResultContract can declare the effects a result proves (ObjectType, Effect, the result field holding the identity) and an EvidenceCondition naming the field and value that make it count, which is what lets the gate match a recorded effect to the contract.