Skip to main content
Glama

The Spice Melange Trading Desk

Fee estimate (input token vs DEEP)

estimate_fees
Read-onlyIdempotent

Estimated DeepBook fee for a fill of qty at price as maker or taker, paid in the input token (rate x 1.25) versus in DEEP (base rate), using the live on-chain fee rates and the DEEP_USDC mid. Education/information only; not financial advice. Read-only public data, may be delayed or wrong. Free: 100 calls/day per client, then 0.002 USDC per call on Sui mainnet, prepaid in batches of about 0.01 USDC (the payment-required response gives an exact amount and a payment_token).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qtyYesBase quantity
poolYesDeepBook pool name BASE_QUOTE, e.g. SUI_USDC (case-insensitive; '/' or '-' also accepted)
roleNotaker
priceNoPrice; defaults to the current mid
payment_txNoOnly after the free tier: Sui transaction digest of your exact USDC payment for payment_token (see the payment-required response)
payment_tokenNoOnly after the free tier: the private payment_token from the payment-required response; it holds your prepaid calls

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, yet the description goes well beyond them: free tier of 100 calls/day per client, 0.002 USDC per call thereafter, prepaid batches of ~0.01 USDC, a payment-required response carrying an exact amount and payment_token, and a data-staleness disclaimer. That is exactly the extra behavioral context (cost, rate limits, auth flow, reliability) an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core purpose and the input-token-vs-DEEP comparison before the disclaimers and pricing mechanics. The payment-tier sentence is long and detail-dense, but every clause (amount, batch size, payment_token) earns its place for a paid tool.

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 6-parameter, no-output-schema tool the description covers purpose, the two fee outputs being compared, the maker/taker dimension, and the full paid-tier flow. It stops short of describing the response shape (e.g. whether both fee figures are returned), which matters slightly more given there is no output schema.

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 83% so the baseline is 3, and the description adds genuine meaning on top: it explains the maker/taker role as the fee-mode switch and frames payment_tx/payment_token as post-free-tier inputs tied to the payment-required response. It does not add format or syntax detail for qty/price beyond the schema, so it stops short of a 5.

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 a specific verb (estimate) and resource (DeepBook fee for a fill of qty at price), and states the exact computation basis: input-token rate x 1.25 versus DEEP base rate, using live on-chain rates and the DEEP_USDC mid. This is unmistakably distinct from siblings like get_mid_price or get_pool_params, so an agent can select it without opening the schema.

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

Usage Guidelines3/5

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

Usage is implied (fee estimation for a prospective fill) and the payment-tier conditions are spelled out, but there is no explicit when-to-use versus alternatives, nor any stated exclusions such as 'do not use for actual order pricing' beyond the education-only disclaimer. Adequate but leaves the routing decision 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