Anthropic Server-side Tools
Claude's exclusive "server-side tools" mechanism — tools are executed on Anthropic's backend, and the response directly returns result blocks and citations. The client does not need to orchestrate the tool call → tool result → model re-invocation loop itself. All other providers' tool use requires the client to execute the tool and return a
tool_result.
Currently Available Server-side Tools
| Tool Type | Field | Purpose |
|---|---|---|
web_search_20250305 | tools[*].type | Anthropic backend automatically performs web search and injects results as citations |
Additional server-side tools added to the platform in the future will be listed here as well.
Supported Endpoints and Models
- Endpoints:
v1/messages(Anthropic native protocol, recommended) /v1/chat/completions(passthrough) - Supported models: Refer to the Server-side Tools / Web Search labels in Model Catalog → Claude.
Trigger Parameters
tools Array, each item in the form:
{
"type": "web_search_20250305",
"name": "web_search",
"max_uses": <int, maximum number of calls per request>
}
Response Structure (v1/messages)
When a server-side tool is triggered, the following blocks appear in order in the response content[] array:
server_tool_use— a record of the tool call made on behalf of the client by the platformweb_search_tool_result— the result returned by the tool (including a list of search results)- A
textblock with acitationsfield — the final answer synthesized by the model based on the results, with each cited passage traceable to a specific source inweb_search_tool_result
{
"content": [
{
"type": "server_tool_use",
"id": "srvtoolu_xxx",
"name": "web_search",
"input": {"query": "today's Shanghai Composite Index closing price"}
},
{
"type": "web_search_tool_result",
"tool_use_id": "srvtoolu_xxx",
"content": [
{"type": "web_search_result", "url": "...", "title": "...", "encrypted_content": "..."}
]
},
{
"type": "text",
"text": "According to ... reports, ...",
"citations": [
{"type": "web_search_result_location", "url": "...", "title": "...", "cited_text": "..."}
]
}
]
}
Example
curl $TURING_BASE_URL/messages \
-H "Authorization: Bearer $TURING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "turing/claude-sonnet-5",
"max_tokens": 4096,
"messages": [{"role": "user", "content": "What is today'\''s Shanghai Composite Index closing price?"}],
"tools": [{
"type": "web_search_20250305",
"name": "web_search",
"max_uses": 3
}]
}'
Billing
web_search_20250305call count is recorded inusage.server_tool_use.web_search_requests; the platform charges$10 / 1K requests- The
textblock in the response (model-synthesized answer) is billed at the standard output token rate - Search results in
web_search_tool_resultare counted as input tokens (if these blocks are retained inmessagesin subsequent turns, they will be billed again)
Comparison with Client-side Tool Use
| Dimension | Client-side (tools + function) | Server-side (tools[*].type: web_search_20250305) |
|---|---|---|
| Who executes the tool | Client code | Anthropic backend |
| Multi-turn orchestration | Client must receive tool_use → return tool_result | Completed within a single request; no multi-turn required |
| Tool scope | Any custom function | Only Anthropic-provided built-in server tools |
| Citations | Custom | Automatic citations field |
| Endpoints | Both protocols supported | Both protocols supported, but v1/messages fields are more native |
Notes
- Retaining server tool blocks across turns: Keeping
server_tool_use/web_search_tool_resultblocks in themessagesof subsequent turns allows the model to refer back to previous search results; however, these blocks count toward input tokens. - Cost control with
max_uses: This is a hard cap on the maximum number of searches within a single request. Once exceeded, further calls are stopped and the results obtained so far are returned. - Protocol differences: Under the
v1/chat/completionsprotocol, server tool fields are also passed through, but thecontentblock structure in the response will be flattened into a string and citations information may be lost. Usev1/messagesfor the full citations experience.
Related Documentation
- Web Search → Claude — Platform-wide cross-provider web search overview
- Anthropic Messages Endpoint — Complete content block structure
- Anthropic Official: Web search tool