Create a tool
Creates an api or code tool.
The body is the Tool envelope without id or read-only fields
(inputs[].required). Request body / headers and code
environment are optional. availability_rules is the structured
Knowledge rule object, never the internal DSL string.
Authorization headers on api tools are stored but stripped
on every read. A code.environment row with
source=sensitive_value is write-only: create stores the
submitted value (empty means an empty secret). A GET-then-POST
clone does not copy the stored secret. Send it again.
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
A two-level tree of conditions that determines availability based on variable values during a conversation. The root group has a match combinator and a list of conditions or condition groups. A rule may contain at most 1000 conditions in total, counting every condition across the root and all nested condition groups.
How an api tool calls its HTTP endpoint, on create
The sandboxed Python a code tool runs, on create
Response
The rule that gates when the tool is offered. null when the tool is always available.
How an api tool calls its HTTP endpoint
The sandboxed Python a code tool runs