Skip to main content
Glama

Mid price

get_mid_price
Read-onlyIdempotent

Calculate mid price, best bid/ask, spread (absolute and bps), and last trade price for a DeepBook pool to support read-only market analysis.

Instructions

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.

Input Schema

NameRequiredDescriptionDefault
poolYesDeepBook pool name BASE_QUOTE, e.g. SUI_USDC (case-insensitive; '/' or '-' also accepted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.3

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world, so safety is covered. The description adds one genuinely useful behavior note beyond that: the data 'may be delayed or wrong', which tells the agent not to treat values as authoritative. It says nothing about failure modes for an unknown pool name or whether the endpoint is cached/rate-limited.

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?

Front-loaded with the payload the tool returns, and the three sentences are short. The disclaimer clause is boilerplate that occupies roughly a third of the text, but it is at least placed after the substantive content rather than before it.

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?

With no output schema, the description carries the return-value burden and does so by enumerating every field returned, which is the most important thing for this tool. The remaining gap is error behavior for an invalid pool identifier, minor for a read-only single-param lookup.

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 coverage is 100% and the single 'pool' parameter is fully documented there, including the BASE_QUOTE format and slash/dash tolerance. The description adds no parameter detail beyond the schema, so the baseline 3 applies.

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 names the resource (a DeepBook pool) and enumerates exactly what is returned: best bid, best ask, mid, spread in abs and bps, plus last trade price. That is a specific, checkable purpose. It does not explicitly contrast itself with get_order_book or get_pool_stats, which return overlapping market data, so sibling differentiation is left implicit.

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

Usage Guidelines2/5

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

'Education/information only; not financial advice' is a legal disclaimer, not usage guidance. There is no statement of when to pick this over get_order_book (full book) or get_pool_stats (aggregates), nor any prerequisite or exclusion. An agent must infer the use case from the returned fields alone.

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