Server Tools
Beta
Server tools are currently in beta. The API and behavior may change.
Server tools are specialized tools operated by OpenRouter that any model can call during a request. When a model decides to use a server tool, OpenRouter executes it server-side and returns the result to the model — no client-side implementation needed.
Server Tools vs Plugins vs User-Defined Tools
Server tools are tools the model can invoke zero or more times during a request. OpenRouter handles execution transparently.
Plugins inject or mutate a request or response to add functionality (e.g. response healing, PDF parsing). They always run once when enabled.
User-defined tools are standard function-calling tools where the model suggests a call and your application executes it.
Available Server Tools
How Server Tools Work
- You include one or more server tools in the
toolsarray of your API request. - The model decides whether and when to call each server tool based on the user’s prompt.
- OpenRouter intercepts the tool call, executes it server-side, and returns the result to the model.
- The model uses the result to formulate its response. It may call the tool again if needed.
Server tools work alongside your own user-defined tools — you can include both in the same request.
Quick Start
Add server tools to the tools array using the openrouter: type prefix:
Combining with User-Defined Tools
Server tools and user-defined tools can be used in the same request:
The model can call any combination of server tools and user-defined tools. OpenRouter executes the server tools automatically, while your application handles the user-defined tool calls as usual.
Usage Tracking
Server tool usage is tracked in the response usage object:
Next Steps
- Web Search — Search the web for real-time information
- Datetime — Get the current date and time
- Tool Calling — Learn about user-defined tool calling