Tool descriptor
What a tool is, as the harness sees it.
A ToolDescriptor has a name, a description, optional WhenToUse and WhenNotToUse sentences, input and output schemas, a result contract, a visibility, a side-effect class, and approval, idempotency and timeout fields. The model reads the description followed by the two sentences; the negative one should name the tool that is correct instead.
| visibility | meaning |
|---|---|
visible | offered to the model; also requires a ResultContract |
hidden | never offered; the runtime may call it |
control | a control surface outside the model's choices |
Input schemas sent to a model stay provider-portable: string enums, no const, and no $ref without its $defs. loop/action_schema_portability_test.go walks every native tool's parameters to enforce it. A tool that arrives through a ToolProvider is validated before it is registered: a model-visible tool needs a result contract, a model-visible tool that changes something needs an InputIntentSchema, and a provider that fails is quarantined.