Skip to main content
Beta
BetaServer 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, so no client-side implementation is 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. The Web Search plugin (plugins: [{ "id": "web" }]) is deprecated. Use the openrouter:web_search server tool instead. See Migrating from the Web Search Plugin.

Available Server Tools

Tools API

The tools catalog is available programmatically. GET /api/v1/tools lists every server tool. GET /api/v1/tools/{name} returns one tool, by canonical name or any accepted alias, with the list of models that run it natively.

How Server Tools Work

  1. You include one or more server tools in the tools array of your API request.
  2. The model decides whether and when to call each server tool based on the user’s prompt.
  3. OpenRouter intercepts the tool call, executes it server-side, and returns the result to the model.
  4. 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.

Native Execution

Some providers have a built-in version of a server tool. For example, OpenAI and Anthropic (as well as other providers) have built-in web search tools. When the model’s endpoint has a “native” version of a tool available, OpenRouter can request the tool to be executed through the provider instead of running its own engine. This is the native engine in the server tool configuration.

Which endpoints run a tool natively

Each endpoint object returned by the endpoints API has a native_tools field. The key is the canonical OpenRouter server tool name. For example, for web search, it is openrouter:web_search. The value is the name of the provider’s tool. For most tools the provider runs it. Bash is the exception: Anthropic’s built-in bash tool returns the command to your application, which runs it. See Bash.
The fallback rules, and which parameters carry over to the provider’s tool, differ per tool:

Privacy and regional availability

Each server tool has an execution path, an In-Region Routing (IRR) availability, and its own data handling. Model-provider ZDR enforcement and IRR apply to the inference request. A tool backend is covered only where the table below states it.

Execution paths

  • Provider: the model’s provider runs the tool natively. See Native Execution.
  • OpenRouter: OpenRouter runs the tool in-process, in an OpenRouter-operated sandbox, in an inner model generation, or by calling a third-party service such as Exa, Parallel, Perplexity, or Firecrawl.
  • Client: OpenRouter returns the tool call to your application, which runs it.

Server tool matrix

The GET /api/v1/tools response lists each tool’s engines with executed_by and data_regions.

ZDR enforcement

ZDR settings restrict which provider endpoints serve model inference. They do not disable server tools or plugins, and they do not change the retention policy of a third-party backend. OpenRouter enforces one tool-level ZDR rule: when ZDR is enforced in your privacy settings or a guardrail, Web Search, Web Fetch, and the Web Search plugin reject the Firecrawl engine. No other tool backend is filtered by ZDR. Review each third-party service’s retention policy before you enable a tool that calls it.

IRR availability

A regional request passes two gates:
  1. Request admission. The regional hostname (eu.openrouter.ai or us.openrouter.ai) and any guardrail allowed_data_regions decide whether the request is accepted. See In-Region Routing.
  2. Execution residency. Each server tool and plugin engine is then checked against the request’s region. With engine: "auto" or no engine, OpenRouter selects only engines resident in that region. A pinned engine that is not resident in the region is rejected.
When no resident engine exists, the request fails. A server tool returns a 403 error, and the Web Search plugin returns a 400 error. OpenRouter does not fall back to global infrastructure. Remove the tool or send the request to https://openrouter.ai. On regional endpoints, client-side Bash is rejected when the same request includes another server tool without an in-region native path. Apply Patch and Advisor have in-region native paths; the other server tools do not.

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 of messages 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 or worker model’s own tool loop and are independent of the outer request budget.

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
  • 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
  • Bash. Anthropic-style bash tool with optional sandboxed server-side execution
  • Fusion. Run a panel of models and an analyst 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