Skip to main content
Glama

Dinero en la Mesa — Perp DEX costs & funding

All-in trading cost on every perp DEX

trading_cost
Read-onlyIdempotent

Full ranking: the round-trip cost (taker fees on both legs + slippage on the live book) of one market order on every perp DEX we read, cheapest first, with each venue's fee tier, book time, and the venues that give no figure and why. Use it to compare venues or explain a choice; for just the winner, use best_venue.

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": {
      "pair": "<pair>",
      "size_usd": "<size_usd>"
    },
    "name": "trading_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYesBase asset of the perpetual, e.g. BTC
size_usdYesOrder size in USD (notional)
monthly_volume_usdNoYour 30-day trading volume in USD, to pick your fee tier (default 0)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already declare read-only, open-world, idempotent, and non-destructive behavior. The description adds useful methodology beyond that: it computes taker fees on both legs plus slippage on the live book, includes fee tier and book time, and reports venues that give no figure and why. It does not detail response structure or pagination, but for a read-only informational tool the added behavioral context is substantial.

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?

The description is two sentences and front-loads the core purpose: a full ranking of round-trip costs, cheapest first. The second sentence efficiently covers usage guidance and the alternative, with no wasted wording.

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?

For a read-only ranking tool with no output schema, the description covers the key return concepts: cost composition, ordering, fee tier, book time, and venues without figures. It is nearly complete, though it could be slightly more explicit about the response shape or cost units.

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 schema already documents pair, size_usd, and monthly_volume_usd. The description mentions the market order and fee tier at a high level but does not add syntax or format details beyond what the schema provides, so the baseline of 3 is appropriate.

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 states a specific verb and resource: it produces a full ranking of round-trip costs for one market order across every perp DEX read by the tool. It also distinguishes itself from the sibling best_venue by specifying that this tool returns the full ranking rather than just the winner.

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?

It explicitly says to use this tool to compare venues or explain a choice, and directs users to best_venue when only the winner is needed. This gives a clear when-to-use and when-to-use-alternative rule.

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