# ToolRoute by YourAITools

> ToolRoute by YourAITools is a paid API for AI agents from api.youraitools.co, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-25).

Selects and ranks the most relevant tools from a large toolset for a given task using BM25, returning a shortlist with confidence scores and token-saving stats.

## Facts

- Endpoint: GET https://api.youraitools.co/toolroute/v1/route?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-25
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toolroute-by-youraitools-b795a587
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fwnBU1Y4B154sNDkA4VeQ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability toolroute-by-youraitools-b795a587
```

Example prompt: I have a registered tool set with ID ts_0d467a406d3eb14344c41c32d8802268 — can you use ToolRoute to find the best tools for the task 'check if this wallet is sanctioned', return up to 5 results in OpenAI format?

## When to prefer this

Choose ToolRoute when your agent has a large toolset (50+ tools) and you need to cheaply narrow it down to a relevant shortlist before passing tool definitions to an LLM, saving context tokens. It uses BM25 (no LLM call) so it is fast and deterministic. Prefer it over embedding-based tool selectors when you want transparent keyword matching and matched-term explanations. Best when you have a pre-registered tool set (set_id) for minimal per-call overhead, or when you want to route on-the-fly with inline tool definitions.

## Known failure modes

- Unknown set_id returns 404 and the caller is never charged
- Malformed tool definitions in the tools array may result in no matches or low confidence
- Query too vague may return low-confidence shortlist with many weakly matched tools
- Exceeding max 500 tools in the tools array will be rejected
- k or max_k out of range (1-50) returns validation error

## How this service works

Tool selection API for AI agents (tool routing). Pick the tools an agent needs for a task from a large tool list: send set_id (from the free /v1/register) or tools, plus the task. Returns a ranked shortlist (adaptive 3-12, or k), confidence, matched terms, token savings and the definitions in MCP, OpenAI, Anthropic or Gemini form. BM25, no LLM. Unknown set_id: 404, never charged.

## Output

Returns a JSON object with the original query, set_id, a ranked shortlist of tools (each with name, BM25 score, and matched terms), a confidence level (high/medium/low), token counts for the full set vs shortlist plus percentage saved, a widened flag, and full tool definitions in the requested format (MCP, OpenAI, Anthropic, Gemini, or names-only).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "query"
     ],
     "properties": {
      "k": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1,
       "description": "Fixed shortlist size (default adaptive)"
      },
      "max_k": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1,
       "description": "Upper bound for the adaptive size (default 12)"
      },
      "query": {
       "type": "string",
       "description": "The task or user request to route, e.g. \"check if this wallet is sanctioned\"."
      },
      "tools": {
       "type": "array",
       "items": {
        "type": "object"
       },
       "description": "Tool definitions (MCP, OpenAI, Anthropic, Gemini or Bedrock form), max 500. For route: only if you have no set_id (the set is registered on the fly)."
      },
      "format": {
       "enum": [
        "mcp",
        "openai",
        "anthropic",
        "gemini",
        "names"
       ],
       "type": "string",
       "description": "Definition format (default mcp; names = names only)"
      },
      "set_id": {
       "type": "string",
       "description": "set_id (\"ts_...\" from register, or a ToolFit pin)."
      }
     },
     "description": "Search intents: tool routing, tool selection api, reduce tool tokens, rag over tools, mcp tool router, pick tools for task"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "query": {
       "type": "string"
      },
      "set_id": {
       "type": "string"
      },
      "tokens": {
       "type": "object"
      },
      "widened": {
       "type": "boolean"
      },
      "shortlist": {
       "type": "array"
      },
      "confidence": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "read a web page as markdown",
  "set_id": "ts_0d467a406d3eb14344c41c32d8802268",
  "tokens": {
   "all": 11585,
   "saved_pct": 89,
   "shortlist": 1278
  },
  "widened": false,
  "shortlist": [
   {
    "name": "read_url",
    "score": 14.23,
    "matched": [
     "read",
     "web",
     "page",
     "markdown"
    ]
   },
   {
    "name": "scan_url",
    "score": 8.09,
    "matched": [
     "read",
     "web",
     "page"
    ]
   },
   {
    "name": "detect_stack",
    "score": 7.05,
    "matched": [
     "web",
     "page"
    ]
   }
  ],
  "confidence": "high"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/toolroute-by-youraitools-b795a587/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.youraitools.co](https://www.zero.xyz/host/api.youraitools.co/llms.txt)
