Server tools are in beta. Request shapes and result payloads may evolve as provider support changes.
Available tools
| Tool | Type | Use it for |
|---|---|---|
| Datetime | gateway:datetime | Current date and time in a chosen timezone |
| Web Search | ai-stats:web_search | Model-directed web searches during a request |
| Web Fetch | ai-stats:web_fetch | Fetching and extracting text from specific URLs |
| Advisor | ai-stats:advisor | Consulting another model mid-generation |
| Image Generation | ai-stats:image_generation | Creating images from the model tool loop |
| Apply Patch | ai-stats:apply_patch | Returning validated patch operations from Responses |
How server tools work
- Add one or more server tools to the
toolsarray. - The model decides whether it needs a tool and emits a tool call.
- AI Stats intercepts the server-tool call, executes it, and sends the result back to the model.
- The model continues and writes the final response.
function tool calls.
Quick start
Combining with function tools
ai-stats:web_search, AI Stats executes that call automatically. If it calls save_research_item, your application receives the function call and must return the function result in a follow-up request.
Supported endpoints
Server tools are supported on:/v1/chat/completions/v1/responses/v1/messages
Usage tracking
Server-tool usage is reported inusage.server_tool_use:
server_tool_web_search_requests, server_tool_web_search_extra_results, server_tool_web_fetch_requests, server_tool_advisor_requests, server_tool_image_generation_requests, server_tool_apply_patch_requests, native_web_search_requests, and native_web_fetch_requests when configured on model price cards.
Tool pages
Datetime
Give the model the current date and time.
Web Search
Let the model search the web when it needs current information.
Web Fetch
Let the model fetch and read specific URLs.
Advisor
Let one model consult another model for guidance mid-generation.
Image Generation
Let the model create images while answering.
Apply Patch
Let the model return patch operations for a client to apply.