Example Usage
import { ServerToolDetails } from "@openrouter/sdk/models";
let value: ServerToolDetails = {
aliases: [
{
apiFormats: [
"anthropic-messages",
],
outputNames: [],
type: "web_search_20250305",
},
],
defaultEngine: "native",
docsUrl: "https://mysterious-testing.info",
engines: [],
fallbackEngine: "exa",
id: "openrouter:web_search",
inputSchema: {
"properties": {},
"type": "object",
},
name: "Web search",
nativeSupport: {
endpointCount: 18,
modelCount: 12,
models: [
{
providers: [
"Anthropic",
"Google",
],
slug: "anthropic/claude-4.5-sonnet",
},
],
},
outputSchema: {
"properties": {},
"type": "object",
},
parametersSchema: {
"properties": {},
"type": "object",
},
status: "active",
summary: "<value>",
supportedApiFormats: [
"anthropic-messages",
],
toolDescription: "<value>",
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
aliases | models.ServerToolInputName[] | :heavy_check_mark: | Every spelling accepted in tools[].type for this tool, including the canonical id, and what the call surfaces as under each | |
defaultEngine | string | :heavy_check_mark: | The engine a request without parameters.engine (or with engine: "auto") runs on; native applies where the endpoint runs the tool itself, otherwise fallback_engine. A request pinned to a data region skips either engine when its data_regions does not list that region. Null for a tool without an engine parameter | native |
docsUrl | string | :heavy_check_mark: | N/A | |
engines | models.ServerToolEngine[] | :heavy_check_mark: | N/A | |
fallbackEngine | string | :heavy_check_mark: | The engine an unpinned request runs on when default_engine is native and the endpoint does not run the tool itself; null when there is no fallback | exa |
id | string | :heavy_check_mark: | Canonical openrouter:* name; the stable tools[].type on every API format in supported_api_formats | openrouter:web_search |
inputSchema | Record<string, any> | :heavy_check_mark: | JSON Schema of the arguments the model emits when calling the tool | { “properties”: {}, “type”: “object” } |
name | string | :heavy_check_mark: | N/A | Web search |
nativeSupport | models.NativeSupport | :heavy_check_mark: | Endpoints whose provider runs this tool itself during inference. Zero for tools no provider runs natively. | { “endpoint_count”: 18, “model_count”: 12 } |
outputSchema | Record<string, any> | :heavy_check_mark: | JSON Schema of the result returned to the model; null when undeclared | { “properties”: {}, “type”: “object” } |
parametersSchema | Record<string, any> | :heavy_check_mark: | JSON Schema for the caller-side tools[].parameters object | { “properties”: {}, “type”: “object” } |
status | models.ServerToolDetailsStatus | :heavy_check_mark: | N/A | active |
summary | string | :heavy_check_mark: | One sentence for cards and search results; never sent to a model | |
supportedApiFormats | models.ServerToolDetailsSupportedApiFormat[] | :heavy_check_mark: | N/A | |
toolDescription | string | :heavy_check_mark: | The description sent upstream as the function tool description |