Skip to main content
Glama

Dinero en la Mesa — Perp DEX costs & funding

Order book depth and spread on every perp DEX

depth
Read-onlyIdempotent

Best bid/ask, spread in bps and the USD resting within 0.5% and 1% of mid on each side, for every live perp DEX order book. Use it before a large order to see how much each book can absorb; the cost of a given size comes from trading_cost.

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>"
    },
    "name": "depth"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairYesBase asset of the perpetual, e.g. BTC

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 readOnly, idempotent, open-world, non-destructive, so the safety profile is covered and the description is free to add domain context. It does that well by defining the liquidity bands (0.5% and 1% of mid) so the agent knows the units and thresholds it will get back. It omits snapshot freshness or refresh cadence, which matters for a 'live' book metric used to size an order.

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, both load-bearing: the first defines the payload, the second defines the use case and the handoff to trading_cost. Front-loaded with the returned metrics and no filler phrasing.

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 single-parameter read with no output schema, the description carries the return-shape burden and does so by enumerating the metrics and their units. What is left unstated is whether results are returned per-DEX in a fixed list, whether any DEX can be missing/stale, and the snapshot timing for a 'live' book.

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?

There is only one parameter and the schema covers it at 100% with an enum plus an example ('Base asset of the perpetual, e.g. BTC'). The description adds nothing about the pair beyond what the schema states, so the baseline 3 for high-coverage schemas applies.

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 names the exact resource (every live perp DEX order book) and a concrete set of metrics (best bid/ask, spread in bps, USD resting within 0.5% and 1% of mid). An agent can tell this apart from trading_cost, best_venue, or funding_rates without inspecting any schema.

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 gives an explicit trigger ('use it before a large order to see how much each book can absorb') and routes the cost-of-size question to the sibling trading_cost. That is a stated when-to-use plus an explicit alternative, which is the top of this dimension.

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