Skip to main content
Glama

Route Task

route_task
Read-only

Use this when the caller needs to discover and rank live x402 providers for a task before choosing downstream spend. KlearFlow does not execute the selected provider. Routing costs $0.005 via x402 Base USDC.

Input Schema

NameRequiredDescriptionDefault
taskYesPlain-English capability the caller wants a live x402 provider to perform.
limitNoMaximum number of ranked provider candidates to return.
maxPriceUsdNoOptional maximum listed provider price in USD.
excludeHostsNoOptional provider hostnames to exclude from the ranked result, useful to avoid self-routing or previously rejected providers.
preferPaidVerifiedNoWhen true, rank providers with independent paid-verification evidence higher.

Output Schema

NameRequiredDescriptionDefault
resultYesRouting result containing the ranked live x402 provider candidates and the selected recommendation; no downstream provider is executed.
paymentYes
proofIdYesUnique KlearFlow proof identifier for this settled paid execution.
priceUsdYesUSDC-denominated execution price settled through x402.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / excludeHosts / description
      Added value: +"Optional provider hostnames to exclude from the ranked result, useful to avoid self-routing or previously rejected providers."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "payment": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "network": {
      +          "description": "Payment network identifier, currently Base mainnet eip155:8453.",
      +          "type": "string"
      +        },
      +        "payer": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Settled payer address when supplied by the payment facilitator."
      +        },
      +        "protocol": {
      +          "const": "x402",
      +          "type": "string"
      +        },
      +        "transaction": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Settlement transaction identifier when available."
      +        }
      +      },
      +      "required": [
      +        "protocol",
      +        "payer",
      +        "transaction",
      +        "network"
      +      ],
      +      "type": "object"
      +    },
      +    "priceUsd": {
      +      "description": "USDC-denominated execution price settled through x402.",
      +      "minimum": 0,
      +      "type": "number"
      +    },
      +    "proofId": {
      +      "description": "Unique KlearFlow proof identifier for this settled paid execution.",
      +      "type": "string"
      +    },
      +    "result": {
      +      "additionalProperties": true,
      +      "description": "Routing result containing the ranked live x402 provider candidates and the selected recommendation; no downstream provider is executed.",
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "proofId",
      +    "priceUsd",
      +    "payment",
      +    "result"
      +  ],
      +  "type": "object"
      +}
  2. Changed4 schema fields changed
    • addedInput schema / properties / limit / description
      Added value: +"Maximum number of ranked provider candidates to return."
    • addedInput schema / properties / maxPriceUsd / description
      Added value: +"Optional maximum listed provider price in USD."
    • addedInput schema / properties / preferPaidVerified / description
      Added value: +"When true, rank providers with independent paid-verification evidence higher."
    • addedInput schema / properties / task / description
      Added value: +"Plain-English capability the caller wants a live x402 provider to perform."
  3. Changed3 schema fields changed
    • addedInput schema / properties / excludeHosts
      Added value: +{
      +  "items": {
      +    "maxLength": 255,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 20,
      +  "type": "array"
      +}
    • addedInput schema / properties / maxPriceUsd
      Added value: +{
      +  "maximum": 1000,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / preferPaidVerified
      Added value: +{
      +  "type": "boolean"
      +}
  4. Added

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, openWorld, non-destructive), so the bar is lower, and the description adds genuinely new operational facts: routing has a real cost ($0.005 via x402 Base USDC) and the tool stops short of execution. It does not explain why idempotentHint=false (e.g. live ranking can shift between calls), which would have been the last useful piece.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, zero filler, with the usage trigger front-loaded and the cost/scope caveats following. Nothing repeats the schema or annotations.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is unnecessary. The description supplies the remaining decision-relevant context: when to call it, that it is discovery-only, and that it costs money — everything an agent needs before invoking.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% across all five parameters, including the meaning of task, limit, maxPriceUsd, excludeHosts, and preferPaidVerified, so the schema carries this dimension. The description adds no parameter-level semantics beyond it, which is the baseline 3 case.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb pair and resource ("discover and rank live x402 providers for a task") and immediately bounds the scope with "KlearFlow does not execute the selected provider." That scope negation cleanly separates it from any execution/spend tool an agent might otherwise confuse it with.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states an explicit trigger condition: use this "before choosing downstream spend" when the caller needs live provider discovery. It does not name a when-not case or point to an alternative tool, but the trigger is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources