Skip to main content
Glama

poly-swap

polygon_swap

Build executable DEX swap calldata on Polygon Mainnet (137).

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": {
      "fromToken": "<fromToken>",
      "toToken": "<toToken>",
      "amount": "<amount>",
      "taker": "<taker>"
    },
    "name": "polygon_swap"
  }
}

Input Schema

NameRequiredDescriptionDefault
takerYesWallet 0x address executing the swap
amountYesAmount in base integer units (e.g. 1000000 for 1 USDC)
toTokenYesDestination token 0x address
fromTokenYesERC-20 address or 0x0000000000000000000000000000000000000000 for POL

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that this constructs calldata rather than executing the swap, which is meaningful behavioral context. However, it omits critical traits for a swap builder: no slippage/deadline controls, no statement of whether approvals are required, and no indication of what the returned calldata must be sent by.

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?

A single front-loaded sentence with zero waste that states the action, the output type, and the chain in one pass. Nothing is redundant.

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?

All four parameters are required and fully documented, but there is no output schema and the description does not describe the return shape (calldata object, tx fields, router address) or the absence of slippage protection. For a calldata-building tool, those gaps leave the agent guessing what it will receive.

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%, so all four parameters are already documented in the schema. The description adds no syntax or format details beyond what the schema provides; 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 states a specific verb and resource ('Build executable DEX swap calldata') and pins the chain ('Polygon Mainnet (137)'), so the agent knows exactly what it produces. No sibling tools exist to differentiate from, so the top score of 5 is not reachable, but the purpose is unambiguous.

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

Usage Guidelines2/5

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

It implies usage by naming the chain and DEX swap, but gives no explicit when-to-use or when-not guidance, no prerequisites (token approvals/allowances), and no mention of alternatives such as other chains or swap mechanisms. The agent must infer the entire usage context.

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