Skip to main content
Glama

The Spice Melange Trading Desk

Mid price

get_mid_price
Read-onlyIdempotent

Best bid, best ask, mid price and spread (abs and bps) for a DeepBook pool, plus last trade price. 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
poolYesDeepBook pool name BASE_QUOTE, e.g. SUI_USDC (case-insensitive; '/' or '-' also accepted)
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.2/5.0
Behavior5/5

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

Beyond the annotations (which cover readOnly/idempotent/openWorld safety), it discloses rate limits (100 calls/day), per-call cost (0.002 USDC), the prepaid batch model, and a data-quality caveat ('may be delayed or wrong'). That is substantive operational context an agent cannot get from the structured fields.

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?

The return payload is front-loaded in the first sentence, followed by a compact compliance line and a pricing/access sentence. The 'not financial advice' line is boilerplate but short and relevant; overall density is good with no redundancy between sentences.

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?

With no output schema, the description correctly enumerates the return fields (bid, ask, mid, spread abs/bps, last trade), and it also covers cost, access tiers, and data reliability. An agent has everything needed to call this and interpret the result without opening anything else.

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 pool, payment_tx, and payment_token are already fully documented in the schema, including format examples and the plb_ pattern. The description's mention of payment_token and the payment-required response restates schema content rather than adding new semantics, so the baseline 3 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 a specific verb ('get') and enumerates exactly what is returned: best bid, best ask, mid price, spread in absolute and bps, plus last trade price, scoped to a DeepBook pool. That precision separates it cleanly from siblings like get_order_book (full depth) and get_pool_stats (pool-level metrics).

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?

It implies the tool is for top-of-book price information and states the tiered access model (free 100 calls/day, then paid via payment_token), but never explicitly says when to prefer this over get_order_book or get_recent_trades. The 'only after the free tier' phrasing is conditional guidance tied to a parameter rather than a use-case routing statement.

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