> To find and run AgentRouter tools, connect to https://mcp.agentrouter.to/. To search this documentation, use https://docs.agentrouter.to/_mcp/server. Append .md to a page URL for Markdown. For the documentation index, see https://docs.agentrouter.to/llms.txt.

# Describe one tool

POST https://api.agentrouter.to/v1/describe
Content-Type: application/json

The tool's input JSON Schema, examples, output description, execution mode, limits,
pagination, price terms (including `pricing_version`, required by invoke), charge
rules, health and related tools. Free; anonymous callers are allowed.


Reference: https://docs.agentrouter.to/api-reference/agent-router-api/discovery/describe

## Authentication

- `Authorization` header (bearer token, required) — An AgentRouter API key or an OAuth access token issued to an MCP host or the CLI.

## Request

### Body (application/json)

This endpoint expects a DescribeRequest.

- `tool_id` (string, required)

## Response

### 200

The tool contract

- `category_ids` (list of string, required)
- `group_ids` (list of string, required)
- `object` (any, required)
- `tool_id` (string, required)
- `tool_version` (string, required)
- `title` (string, required)
- `description` (string, required)
- `provider` (ToolDescriptionProvider, required)
- `tags` (list of string, required)
- `use_cases` (list of string, required)
- `input_schema` (ToolDescriptionInputSchema, required) — JSON Schema for `input`.
- `examples` (list of ToolDescriptionExamplesItems, required)
- `output` (ToolDescriptionOutput, required)
- `execution` (ToolDescriptionExecution, required)
- `limits` (ToolDescriptionLimits, required, nullable)
- `pagination` (ToolDescriptionPagination, required, nullable)
- `executable` (boolean, required)
- `pricing` (ToolDescriptionPricing, required)
- `health` (Health, required) — Finished logical calls in the window, across accounts and channels. Read on demand and cached for 60 seconds; never probes a provider.
- `alternatives` (list of ToolDescriptionAlternativesItems, required)

## Errors

### 400 Bad Request Error

Invalid request (for example INVALID_REQUEST, INPUT_INVALID, PRICING_VERSION_REQUIRED, PRICE_NOT_CLIENT_SETTABLE). Nothing was executed.

- `error` (ErrorError, required)
- `run` (Run, optional) — The receipt for one invocation. Run status, provider outcome and billing are separate facts.

### 404 Not Found Error

Not found for this account (TOOL_NOT_FOUND, RUN_NOT_FOUND, NO_RESULT, ...)

- `error` (ErrorError, required)
- `run` (Run, optional) — The receipt for one invocation. Run status, provider outcome and billing are separate facts.

## Types

### ToolDescriptionProvider

- `id` (string, required)
- `name` (string, required)
- `homepage` (string, optional, nullable)
- `docs_url` (string, optional, nullable)

### ToolDescriptionInputSchema

JSON Schema for `input`.

### ToolDescriptionExamplesItems

- `title` (string, required)
- `input` (any, required)

### ToolDescriptionOutput

- `description` (string, optional)

### ToolDescriptionExecution

- `mode` (enum, required)
  - Allowed values: `sync`, `async`
- `stoppable` (boolean, required)
- `max_duration_ms` (integer, required)
- `long_running` (boolean, required)

### ToolDescriptionLimits

### ToolDescriptionPagination

### ToolDescriptionPricing

- `pricing_version` (string, required, nullable) — Pass to invoke. Null while the price is pending (not executable).
- `basis` (enum, required) — `units` bills provider units at a rate; `upstream_usd` bills the provider-reported cost.
  - Allowed values: `units`, `upstream_usd`
- `unit` (string, required) — Usage unit, e.g. credit, request, usd.
- `price_multiplier` (string, required, nullable) — Single multiplier on the base price: "1" list price, "0.5" half price, "1.2", or "0" free.
- `multiplier_label` (string, required, nullable)
- `free` (boolean, required) — True when pricing is confirmed and max_per_call_usd is "0" for every supported input. A single free result does not make a tool free.
- `max_per_call_usd` (string, required, nullable) — Customer charge ceiling that applies across inputs at this price. "0" guarantees a free call. Null means the ceiling depends on input or pricing is pending.
- `summary` (string, required)
- `status` (enum, required)
  - Allowed values: `confirmed`, `pending`
- `effective_from` (datetime, required)
- `effective_to` (string, required, nullable)
- `public_price` (ToolDescriptionPricingPublicPrice, required) — The provider's published price this tool is based on.
- `usage_unit` (string, required)
- `maximum_rule` (string, required)
- `promotion` (ToolDescriptionPricingPromotion, required, nullable)
- `rules` (map from string to string, required) — When a call is charged.
- `invoke_requires` (list of string, required)
- `unit_price_usd` (string, optional, nullable) — Customer rate per usage unit after the current multiplier. A free call can consume zero units at a positive rate. Null for provider-reported or unconfirmed rates.
- `image_sample` (ToolDescriptionPricingImageSample, optional) — Illustrative price for one image at the stated usage and current customer rates, before a conditional image offer.
- `image_offer` (ToolDescriptionPricingImageOffer, optional) — Active discount on the entire call when the final delivered image meets the pixel threshold. Already included at settlement.
- `image_pricing` (ToolDescriptionPricingImagePricing, optional) — Effective customer price per output image at each supported tier.
- `video_pricing` (ToolDescriptionPricingVideoPricing, optional) — Effective customer video rates. The sample uses the first tier without reference footage. An equivalent per-second rate for a fixed clip is approximate.
- `usage_evidence` (any, optional) — Where usage is read from in the provider response.

### Health

Finished logical calls in the window, across accounts and channels. Read on demand and cached for 60 seconds; never probes a provider.

- `status` (enum, required) — `unknown` means too few recent runs, not unavailable.
  - Allowed values: `unknown`, `healthy`, `degraded`, `outage`
- `window_days` (integer, required)
- `window` (HealthWindow, required)
- `computed_at` (datetime, required) — Snapshot cutoff used by this calculation.
- `samples` (integer, required) — Same as counts.evaluated: COMPLETED + FAILED + TIMED_OUT. STOPPED and BLOCKED are excluded.
- `counts` (HealthCounts, required)
- `success_rate` (double, required, nullable) — counts.completed / counts.evaluated; null with no evaluated calls. Not rounded before display.
- `provider_error_rate` (double, required, nullable) — counts.provider_errors / counts.evaluated; null with no evaluated calls.
- `platform_error_rate` (double, required, nullable) — counts.platform_errors / counts.evaluated; null with no evaluated calls.
- `empty_rate` (double, required, nullable) — Legacy connector-reported empty outcomes divided by all finished runs, including STOPPED. Detection coverage is endpoint-specific.
- `latency` (HealthLatency, required)
- `last_success_at` (string, required, nullable) — Latest completedAt among successful calls in this window.
- `p50_ms` (double, required, nullable, deprecated) — Alias of latency.p50_ms; successful execution samples only.
- `p95_ms` (double, required, nullable, deprecated) — Alias of latency.p95_ms; successful execution samples only.

### ToolDescriptionAlternativesItems

- `tool_id` (string, required)
- `title` (string, required)
- `provider` (string, required)

### ErrorError

- `code` (string, required)
- `message` (string, required)
- `hints` (list of Hint, required)
- `details` (map from string to any, required)

### Run

The receipt for one invocation. Run status, provider outcome and billing are separate facts.

- `object` (any, required)
- `run_id` (string, required)
- `status` (enum, required)
  - Allowed values: `READY`, `RUNNING`, `STOPPING`, `COMPLETED`, `FAILED`, `BLOCKED`, `STOPPED`, `TIMED_OUT`
- `tool_id` (string, required)
- `tool_version` (string, required)
- `provider` (string, required)
- `input` (any, required) — The submitted tool input
- `session_id` (string, required, nullable)
- `caller` (RunCaller, required)
- `channel` (enum, required)
  - Allowed values: `http`, `cli`, `mcp`, `web`
- `created_at` (string, required, nullable)
- `started_at` (string, required, nullable)
- `completed_at` (string, required, nullable)
- `latency_ms` (integer, required, nullable)
- `replayed` (boolean, required) — True when an idempotency key returned an existing run.
- `stoppable` (boolean, required)
- `provider_response` (RunProviderResponse, required)
- `error` (RunError, required, nullable)
- `billing` (RunBilling, required)
- `result` (RunResult, required)
- `next_cursor` (string, required, nullable) — Pass back as the tool's cursor input for the next page (a new billed call).
- `hints` (list of Hint, required)
- `output` (any, required) — The provider's output exactly as returned

### ToolDescriptionPricingPublicPrice

The provider's published price this tool is based on.

- `summary` (string, optional)
- `sourceUrl` (string, optional)
- `retrievedAt` (string, optional)

### ToolDescriptionPricingPromotion

- `promotion_id` (string, optional)
- `ends_at` (string, optional, nullable)
- `note` (string, optional, nullable)
- `per_account_daily_calls` (integer, optional, nullable)

### ToolDescriptionPricingImageSample

Illustrative price for one image at the stated usage and current customer rates, before a conditional image offer.

- `width` (integer, required)
- `height` (integer, required)
- `usage` (string, required)
- `usd` (string, required)

### ToolDescriptionPricingImageOffer

Active discount on the entire call when the final delivered image meets the pixel threshold. Already included at settlement.

- `percent_off` (integer, required)
- `min_delivered_pixels` (integer, required)
- `ends_at` (datetime, required) — Exclusive cutoff.
- `sample_usd` (string, optional) — Discounted customer amount for image_sample when that sample qualifies.

### ToolDescriptionPricingImagePricing

Effective customer price per output image at each supported tier.

- `rates` (list of ToolDescriptionPricingImagePricingRatesItems, required)

### ToolDescriptionPricingVideoPricing

Effective customer video rates. The sample uses the first tier without reference footage. An equivalent per-second rate for a fixed clip is approximate.

- `unit` (enum, required)
  - Allowed values: `clip`, `second`
- `sample_seconds` (integer, required)
- `sample_usd` (string, required)
- `rates` (list of ToolDescriptionPricingVideoPricingRatesItems, required)
- `reference_billing` (string, optional)

### HealthWindow

- `from` (datetime, required) — Inclusive window start.
- `to` (datetime, required) — Exclusive window end.
- `time_basis` ("completed_at", required)

### HealthCounts

- `evaluated` (integer, required)
- `completed` (integer, required) — Includes legitimate empty results.
- `failed` (integer, required)
- `timed_out` (integer, required)
- `stopped` (integer, required) — Cancellations reported separately from reliability samples.
- `empty` (integer, required) — Existing connector-reported empty outcomes; detection is endpoint-specific.
- `provider_errors` (integer, required) — Evaluated calls with provider error origin.
- `platform_errors` (integer, required) — Evaluated calls with platform error origin.

### HealthLatency

- `basis` ("execution", required) — completedAt - startedAt; includes async processing and polling waits, excludes final settlement and client delivery.
- `population` ("completed", required)
- `samples` (integer, required) — Successful calls with a finite nonnegative execution time. May be smaller than counts.completed.
- `method` ("nearest_rank", required)
- `p50_ms` (double, required, nullable) — Exact nearest-rank p50 of successful execution times; null with no latency samples.
- `p95_ms` (double, required, nullable) — Exact nearest-rank p95 of successful execution times; null with no latency samples.

### Hint

- `code` (string, required) — Machine-readable next step, e.g. POLL_RUN, DESCRIBE_TOOL, TOP_UP, NEXT_PAGE.
- `message` (string, required)
- `params` (map from string to any, optional)

### RunCaller

- `type` (enum, required)
  - Allowed values: `api_key`, `oauth`, `session`
- `name` (string, required)

### RunProviderResponse

- `http_status` (integer, required, nullable)
- `outcome` (enum, required)
  - Allowed values: `success`, `empty`, `provider_error`, `pending`
- `status` (string, required, nullable)
- `request_id` (string, required, nullable)
- `task_id` (string, required, nullable)

### RunError

- `code` (string, required)
- `message` (string, required)
- `origin` (enum, required)
  - Allowed values: `provider`, `platform`, `client`
- `retryable` (boolean, required, nullable)
- `details` (RunErrorDetails, optional, nullable) — Sanitized provider error evidence. Absent for old runs and errors without an upstream response.

### RunBilling

- `status` (enum, required)
  - Allowed values: `none`, `reserved`, `settled`, `refunded_partial`, `refunded_full`
- `reason` (enum, required) — Why the charge is what it is. A zero charge always carries a reason.
  - Allowed values: `charged`, `charged_capped`, `free_promotion`, `zero_base`, `waived_provider_error`, `waived_platform_error`, `waived_empty_result`, `waived_stopped`, `waived_timeout`, `waived_unknown_cost`, `blocked_before_execution`
- `currency` (any, required)
- `pricing_version` (string, required)
- `price_multiplier` (string, required, nullable)
- `promotion_id` (string, required, nullable)
- `max_cost_usd` (string, required) — Exact USD amount as a decimal string.
- `reserved_usd` (string, required) — Exact USD amount as a decimal string.
- `base_charge_usd` (string, required, nullable) — Price before the multiplier.
- `customer_charge_usd` (string, required) — Exact USD amount as a decimal string.
- `customer_refund_usd` (string, required) — Exact USD amount as a decimal string.
- `net_charge_usd` (string, required) — Exact USD amount as a decimal string.
- `charge_is_new` (boolean, required) — False on an idempotent replay; nothing new was charged.
- `usage` (RunBillingUsage, required, nullable)

### RunResult

- `available` (boolean, required)
- `expired` (boolean, required) — True when a previously stored result has expired or is no longer present.
- `bytes` (integer, required, nullable)
- `expires_at` (string, required, nullable)
- `url` (string, required, nullable) — GET this to download the stored output; it never re-runs the tool.
- `inline` (boolean, required) — False when the output is too large to include; download it from url.

### ToolDescriptionPricingImagePricingRatesItems

- `label` (string, required)
- `usd_per_image` (string, required)

### ToolDescriptionPricingVideoPricingRatesItems

- `label` (string, required)
- `usd_per_second` (string, required)
- `usd_per_clip` (string, optional)

### RunErrorDetails

Sanitized provider error evidence. Absent for old runs and errors without an upstream response.

- `body` (string, required) — Provider response JSON text with credentials and internal pricing fields redacted; non-JSON bodies are omitted. Limited to 20000 characters.
- `truncated` (boolean, required) — True when only a prefix of the sanitized error was retained.

### RunBillingUsage

- `unit` (string, required)
- `quantity` (string, required, nullable)
- `status` (enum, required)
  - Allowed values: `known`, `none`, `unknown`

## Examples

**Request**

```json
{
  "tool_id": "anyapi.twitter.search"
}
```

**Response**

```json
{
  "category_ids": [
    "string"
  ],
  "group_ids": [
    "string"
  ],
  "object": null,
  "tool_id": "string",
  "tool_version": "string",
  "title": "string",
  "description": "string",
  "provider": {
    "id": "string",
    "name": "string",
    "homepage": "string",
    "docs_url": "string"
  },
  "tags": [
    "string"
  ],
  "use_cases": [
    "string"
  ],
  "input_schema": {},
  "examples": [
    {
      "title": "string"
    }
  ],
  "output": {
    "description": "string"
  },
  "execution": {
    "mode": "sync",
    "stoppable": true,
    "max_duration_ms": 1,
    "long_running": true
  },
  "limits": {},
  "pagination": {},
  "executable": true,
  "pricing": {
    "pricing_version": "string",
    "basis": "units",
    "unit": "string",
    "price_multiplier": "string",
    "multiplier_label": "string",
    "free": true,
    "max_per_call_usd": "string",
    "summary": "string",
    "status": "confirmed",
    "effective_from": "2024-01-15T09:30:00Z",
    "effective_to": "string",
    "public_price": {
      "summary": "string",
      "sourceUrl": "string",
      "retrievedAt": "string"
    },
    "usage_unit": "string",
    "maximum_rule": "string",
    "promotion": {
      "promotion_id": "string",
      "ends_at": "string",
      "note": "string",
      "per_account_daily_calls": 1
    },
    "rules": {},
    "invoke_requires": [
      "string"
    ],
    "unit_price_usd": "string",
    "image_sample": {
      "width": 1,
      "height": 1,
      "usage": "string",
      "usd": "string"
    },
    "image_offer": {
      "percent_off": 1,
      "min_delivered_pixels": 1,
      "ends_at": "2024-01-15T09:30:00Z",
      "sample_usd": "string"
    },
    "image_pricing": {
      "rates": [
        {
          "label": "string",
          "usd_per_image": "string"
        }
      ]
    },
    "video_pricing": {
      "unit": "clip",
      "sample_seconds": 1,
      "sample_usd": "string",
      "rates": [
        {
          "label": "string",
          "usd_per_second": "string",
          "usd_per_clip": "string"
        }
      ],
      "reference_billing": "string"
    },
    "usage_evidence": null
  },
  "health": {
    "status": "unknown",
    "window_days": 1,
    "window": {
      "from": "2024-01-15T09:30:00Z",
      "to": "2024-01-15T09:30:00Z",
      "time_basis": "string"
    },
    "computed_at": "2024-01-15T09:30:00Z",
    "samples": 1,
    "counts": {
      "evaluated": 1,
      "completed": 1,
      "failed": 1,
      "timed_out": 1,
      "stopped": 1,
      "empty": 1,
      "provider_errors": 1,
      "platform_errors": 1
    },
    "success_rate": 0.5,
    "provider_error_rate": 0.5,
    "platform_error_rate": 0.5,
    "empty_rate": 1.1,
    "latency": {
      "basis": "string",
      "population": "string",
      "samples": 1,
      "method": "string",
      "p50_ms": 1.1,
      "p95_ms": 1.1
    },
    "last_success_at": "string",
    "p50_ms": 1.1,
    "p95_ms": 1.1
  },
  "alternatives": [
    {
      "tool_id": "string",
      "title": "string",
      "provider": "string"
    }
  ]
}
```

**SDK Code**

```python Discovery_describe_example
import requests

url = "https://api.agentrouter.to/v1/describe"

payload = { "tool_id": "anyapi.twitter.search" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Discovery_describe_example
const url = 'https://api.agentrouter.to/v1/describe';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"tool_id":"anyapi.twitter.search"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Discovery_describe_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.agentrouter.to/v1/describe"

	payload := strings.NewReader("{\n  \"tool_id\": \"anyapi.twitter.search\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Discovery_describe_example
require 'uri'
require 'net/http'

url = URI("https://api.agentrouter.to/v1/describe")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"tool_id\": \"anyapi.twitter.search\"\n}"

response = http.request(request)
puts response.read_body
```

```java Discovery_describe_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.agentrouter.to/v1/describe")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"tool_id\": \"anyapi.twitter.search\"\n}")
  .asString();
```

```php Discovery_describe_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.agentrouter.to/v1/describe', [
  'body' => '{
  "tool_id": "anyapi.twitter.search"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Discovery_describe_example
using RestSharp;

var client = new RestClient("https://api.agentrouter.to/v1/describe");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"tool_id\": \"anyapi.twitter.search\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Discovery_describe_example
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["tool_id": "anyapi.twitter.search"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.agentrouter.to/v1/describe")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```