Skip to main content
Glama

get_swap_route

Finds all possible swap paths between two tokens, including multi-hop routes, to support swaps when no direct pool exists.

Instructions

Find all possible swap paths between two tokens, including multi-hop routes. Useful for tokens without a direct pool.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "tokenA": "<tokenA>",
      "tokenB": "<tokenB>"
    },
    "name": "get_swap_route"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenAYesSource token symbol or contract ID
tokenBYesDestination token symbol or contract ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden; the verb 'Find' and 'all possible' imply a read-only discovery call that does not execute a swap, which is useful context. It stops short of confirming non-mutation, stating any cost or rate limits, or describing whether routes are ranked, leaving meaningful gaps for an unannotated tool.

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

Conciseness4/5

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

Two short sentences with the core capability front-loaded and no filler. The second sentence is a fragment but earns its place by flagging the multi-hop use case.

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

Completeness3/5

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

For a simple two-parameter read tool this is close to sufficient, but with no output schema the agent gets no sense of what a 'route' contains (pools, hops, fees, ordering) or how many paths may come back. A single clause on the return shape would close the remaining gap.

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 coverage is 100% and both parameters already document 'symbol or contract ID' precisely. The description only restates 'between two tokens', adding no new meaning about accepted formats or ambiguity between symbols and addresses, so the baseline 3 applies.

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

Purpose4/5

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

The description names a specific verb and resource ('Find all possible swap paths between two tokens') and adds scope ('including multi-hop routes'), so the agent knows this is route discovery rather than quoting or execution. It does not name a sibling like get_quote or swap_txn to sharpen the boundary, which keeps it from a 5.

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

Usage Guidelines3/5

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

'Useful for tokens without a direct pool' gives one concrete triggering condition, which is real when-to-use guidance. However, it never says when NOT to use it (e.g. when a direct pool exists and a simple quote suffices) nor names an alternative tool, so the agent must infer the routing decision.

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