- Tool exposure: remove blocked tools before Anthropic sees the request.
- Tool-call check: evaluate returned
tool_useblocks before your app executes local code.
Supported Tools
The current wrapper supports user-defined client tools with a stablename. The tool type may be omitted, custom, or function.
send_email, the wrapper forwards only the remaining tools.
Tool Choice
When tools are filtered, the wrapper also sanitizestool_choice.
If the request forces a specific tool with tool_choice: { type: "tool", name: "send_email" } and Averta blocks send_email, the wrapper removes that forced choice before forwarding the request. Otherwise the request would ask Anthropic to call a tool it can no longer see.
Tool-call Checks
After Anthropic responds, the wrapper reads each returnedtool_use block:
- the tool call id from
tool_use.id - the tool name from
tool_use.name - the tool arguments from
tool_use.input - bounded conversation context from the current Messages request
- the request
run_idcreated by the request checkpoint
block, the wrapper throws AvertaSdkError and does not return that response to your application. Your app should not execute the tool.