Skip to main content
Glama

get_trade_depth

Measure how much of a token can be bought and sold across configured venues at multiple USD sizes, including per-size impact, round-trip cost, and the largest size within your tolerance.

Instructions

Position sizing: measure how much of a token the chain ACTUALLY lets you trade - entry and exit across every configured venue at a ladder of USD sizes, per-size impact and round-trip cost, plus the largest size under your cost tolerance. Ask BEFORE choosing a position size. Costs $0.05 per call.

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": {
      "tokenAddress": "<tokenAddress>",
      "chainId": "<chainId>"
    },
    "name": "get_trade_depth"
  }
}

Input Schema

NameRequiredDescriptionDefault
chainIdYesREQUIRED. 1 Ethereum, 42161 Arbitrum, 8453 Base. There is no default; omitting it returns 400 missing_chain.
sizesUsdNoLadder of sizes in USD, max 6 (default 100, 1000, 10000, 100000)
baseSymbolNoWhat you pay with (default USDC)
tokenAddressYesToken you plan to buy (symbol or 0x address)
maxRoundTripPctNoYour round-trip cost tolerance, default 1%

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.3

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: it queries every configured venue, measures both entry and exit, and explicitly states a $0.05 per-call cost. It stops short of saying the operation is read-only/non-mutating or what happens on unsupported chains or thin liquidity, which would complete the picture.

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 tight sentences, front-loaded with the label "Position sizing:" and closing with the actionable ordering cue and cost. Every clause carries information; nothing is redundant padding.

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?

For a five-parameter, fully schema-documented tool with no output schema, the description supplies exactly what is missing: the shape of the result (per-size impact, round-trip cost, max size under tolerance) and the cost of the call. An agent can decide to call it and interpret the response without further context.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining what the parameters jointly produce — the USD size ladder, per-size impact, and that maxRoundTripPct drives selection of the largest viable size. It adds conceptual meaning rather than restating field descriptions.

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: measure how much of a token the chain actually lets you trade, across venues, at a ladder of USD sizes, returning per-size impact, round-trip cost, and the largest size under tolerance. That scope is clearly distinct from routing or quote-fairness tools, though no sibling is named explicitly to sharpen the contrast.

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?

"Ask BEFORE choosing a position size" gives a concrete point in the workflow to invoke it, which is real when-to-use guidance. It does not name an alternative or state when not to use it (e.g., versus get_best_route or verify_quote_fairness), so the guidance is clear but not complete.

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