Skip to main content
Glama

check_trade_allowance

Check ERC-20 allowance for an upcoming CoW swap (cow_swap) or Fusion bridge (fusion_bridge). Call before propose_swap / propose_bridge; if insufficient, use propose_token_approve then confirm.

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": {
      "fromWalletId": "<fromWalletId>",
      "tokenAddress": "<tokenAddress>",
      "requiredAmountSmallest": "<requiredAmountSmallest>",
      "flow": "<flow>"
    },
    "name": "check_trade_allowance"
  }
}

Input Schema

NameRequiredDescriptionDefault
flowYescow_swap = CoW VaultRelayer; fusion_bridge = 1inch Limit Order
fromWalletIdYesSource EVM wallet id
tokenAddressYesSell token contract (0x…)
requiredAmountSmallestYesRequired allowance in token smallest units (e.g. USDC 6 decimals)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/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 burden. 'Check' implies a safe read, and the insufficiency branch is disclosed, but the description never states what the result looks like (allowance value vs. a sufficiency flag) or that it is purely non-mutating. Adequate but with a real gap for a tool with zero annotation coverage.

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?

Two sentences with zero filler, and the primary purpose plus the pre-requisite call ordering are front-loaded. Every clause conveys either scope or a next action.

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

Completeness4/5

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

The description ties the tool into the propose/approve workflow completely, which is the main thing an agent needs. With no output schema, it would ideally state what the check returns, but the insufficiency handling covers the practical decision the agent must make.

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 the baseline is 3. The parentheticals for cow_swap and fusion_bridge largely restate the enum descriptions already in the schema, and nothing is added about units or wallet-id conventions beyond what the schema documents.

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?

States a specific verb ('Check') and resource ('ERC-20 allowance') scoped to two named flows (cow_swap, fusion_bridge). This clearly differentiates it from siblings like list_token_spender_grants or preview_swap_quote, which do not perform a per-flow allowance check.

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

Usage Guidelines5/5

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

Explicitly says when to call it ('Call before propose_swap / propose_bridge') and what to do on failure ('use propose_token_approve then confirm'). It names the sibling tools and the conditional branch that selects them, leaving nothing to inference.

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