BetaServer tools are currently in beta. The API and behavior may change.
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.
Tool Call Limits
Every request that uses server tools runs an agent loop with a step budget. Each tool call the model makes (a web search, an image generation, etc.) consumes one step; when the budget is exhausted, the model is asked to produce its final answer with the context gathered so far. Two top-level request fields control the outer loop (both are siblings ofmessages and tools):
Tools that run their own inner agent loops have separate, per-tool budgets configured via the tool’s
parameters:
These inner budgets bound each panelist, advisor, or worker model’s own tool loop and are independent of the outer request budget.
Quick Start
Add server tools to thetools array using the openrouter: type prefix:
Combining with User-Defined Tools
Server tools and user-defined tools can be used in the same request:Usage Tracking
Server tool usage is tracked in the responseusage object:
Next Steps
- Web Search — Search the web for real-time information
- Datetime — Get the current date and time
- Image Generation — Generate images from text prompts
- Web Fetch — Fetch and extract content from URLs
- Apply Patch — Propose file edits via V4A diffs
- Shell — Run commands in a hosted, sandboxed shell
- Files — Read, write, edit, and list workspace files
- Fusion — Run a panel of models and a judge for multi-model analysis
- Advisor — Consult a stronger model for guidance mid-generation
- Subagent — Delegate self-contained tasks to a smaller, faster worker model
- Search Models — Search and filter the OpenRouter model catalog
- Tool Calling — Learn about user-defined tool calling