- Tool exposure: remove tools before the model sees them.
- Tool-call check: evaluate a model-requested tool call before your app executes it.
Responses Tools
For Responses API request-time filtering, the wrapper understands:- function tools, keyed by
name - custom tools, keyed by
name - hosted OpenAI tools, keyed by
type - MCP tools, keyed as
mcp:<server_label>whenserver_labelexists
send_email, the wrapper forwards only the remaining tools.
Chat Completions Tools
For Chat Completions, the wrapper understands function and custom tools.tool_choice so the request does not force a blocked tool.
Decision Callback
UseonDecision to inspect original, blocked, and forwarded tools.
Tool-call Checks
After OpenAI returns a tool call, Averta checks it before guarded tool-call events are exposed to your app. If the tool-call decision isblock, the wrapper throws. Your app should not execute the tool.
Debugging
| Symptom | Check |
|---|---|
| Tool disappeared | Inspect request decision blockedTools. |
| Forced tool choice was ignored | The requested tool may have been blocked and tool_choice sanitized. |
| Tool-call event throws | The tool-call checkpoint blocked execution. |
| Hosted tool not filtered as expected | Confirm policy uses the normalized tool identity, such as web_search_preview or mcp:<server_label>. |