Eight minutes to take-off. The reindeer are harnessed, the last door of the calendar is open, and Santa is already pulling on his boots with one more question.
- Santa
How much snow is on the route, and how late does it make me? I need it before I'm in the sleigh!
- Sprocket
On it! I'll host a search scraper, spin up a Python box, and write a loop to glue them together. Three hours, tops.
- Tinsel
Put the loop down again. List
orq:web_searchandorq:code_interpreterintools, and the router runs both plus the loop between them. - Sprocket
So the workshop owns the power tools and I just borrow them? Cancelling my three hours! Best present yet!
- Rudolph
Snow report in. Delay worked out. All twenty-four doors cleared. Runners up. See you next December.
- clientYour apptools: [orq:*]
- orq.aiAI Routerruns the model's tool calls
- 1search2run codeserver toolorq:web_searchserver toolorq:code_interpreter
- resultOne answerwritten by the model
How it works
Tinsel’s fix is two entries in a list you already send. A server tool is a tool that Orq runs for you, inside the request:
- Declare. Add one or more
orq:*tools to the request’stoolsarray. - Decide. The model chooses whether to call a tool and supplies its arguments.
- Run. The router executes the tool and returns the result to the model.
- Repeat or finish. The model can call another tool or write its final answer.
limits.max_iterations bounds that loop. It defaults to 10 model calls and accepts 1 to 100. Server tools work on POST /v3/router/responses and POST /v3/router/chat/completions. The selected model must support tool calling.
Try it with curl
curl -X POST https://my.orq.ai/v3/router/responses \
-H "Authorization: Bearer $ORQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5-5",
"input": "How far is Sydney from the Pole? Hours at 1000 km/h?",
"tools": [
{"type": "orq:web_search", "max_results": 5, "max_uses": 3},
{"type": "orq:code_interpreter"}
]
}'
Or from the OpenAI SDK
from openai import OpenAI
import os
client = OpenAI(
api_key=os.environ["ORQ_API_KEY"],
base_url="https://my.orq.ai/v3/router",
)
response = client.responses.create(
model="anthropic/claude-sonnet-5-5",
input="How many days until next Christmas Eve in Amsterdam?",
tools=[
{"type": "orq:datetime", "timezone": "Europe/Amsterdam"},
{"type": "orq:code_interpreter"},
],
)
print(response.output_text)
print(response.usage)
The model sees each tool with orq: replaced by orq_, so orq:web_search shows up as orq_web_search.
Who runs which tool
| Tool | type |
Who runs it | Who gets the result |
|---|---|---|---|
| Server tool | orq:* |
The router | The model |
| Function tool | function |
Your app | Your app, which sends it back |
Server tools fit generic jobs: search, fetch a page, run sandboxed Python, read the date. When a tool must touch your own systems, use a function tool. To share your own tools with MCP clients such as Claude Code or Cursor, serve them over public HTTPS, add them as an MCP Server, sync it so Orq discovers its tools, link it to a gateway, then connect a client:
npx add-mcp https://my.orq.ai/v3/mcp/workspace-tools \
--name workspace-tools
A gateway runs in Code mode by default: the client gets three tools (search, describe, execute) instead of the whole catalog, and execute takes up to 20 calls at once. Pick Direct mode for a small catalog where the client expects every tool in its list. MCP Servers and MCP Gateways are free on every plan.
Limits and costs
- Web search.
max_resultsdefaults to 5 (1 to 25).max_usesdefaults to 20. Each search that starts costs $0.005; failed searches use a slot but are not charged. - Code interpreter. Each execution times out after 60 seconds. Stage up to 10 workspace files, each up to 10 MB.
network.modedefaults todisabled, but egress enforcement is still rolling out, so for now the sandbox keeps the deployment’s default internet access.
Chat Completions
Chat Completions returns the usage counters but not the tool results themselves. Read results from the Responses API output items, or send store: true and retrieve the response. It also answers 400 if you combine orq:* tools with n above 1 or with provider-hosted tools such as web_search.
Nice list
- Cap paid tools with
max_uses. Eachorq:web_searchthat starts costs $0.005, and the default allows 20 search attempts per request. - Use
/v3/router/responsesfor reasoning models. On Chat Completions, a reasoning model rejectstoolsunlessreasoning_effortisnone. - Mix server tools and function tools in one request. The router runs the
orq:*calls and hands function calls back to your app.
Naughty list
- Setting
max_tool_callsto stop a long loop. It is echoed back but does not limit the server-side loop:limits.max_iterationsdoes. - Naming a function tool
orq_web_searchin a request that also listsorq:web_search. The model sees the server tool under that name, and tool names must be unique within a request. - Reading tool results from a Chat Completions response. It returns the usage counters but not the results: read them from the Responses API output items, or send
store: true. - Pointing an MCP Server at a STDIO process. Upstream servers must use HTTP or SSE: STDIO is rejected.
Elf's challenge
Send this page's curl request and open usage.server_tool_use. Which two counters show up, and which of the two tools adds a server-tool charge to the response cost?
Stuck? Ask Tinsel for a hint
Look for web_search_requests and code_interpreter_sessions. Each web search that starts costs $0.005. Code interpreter has no separate server-tool charge in this release.
Christmas crackerWhich server tool does Santa call before anything else on Christmas Eve?Pull it for the punchline
orq:datetime. One shift a year: he double-checks it's tonight.