Skip to main content
Glama

Get DeepBook mid price

read_get_deepbook_mid_price
Read-only

Retrieve a DeepBook pool's mid-price snapshot using its pool key to support pre-trade pricing checks.

Instructions

Return a DeepBook pool mid-price snapshot. Not price impact, route quality, global market price, fiat cash-out, transaction building, or signing readiness.

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": {
      "poolKey": "<poolKey>"
    },
    "name": "read_get_deepbook_mid_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
poolKeyYes

Output Schema

NameRequiredDescriptionDefault
okYes
dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.5

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already cover the safety profile with readOnlyHint=true and openWorldHint=true. The description adds the 'snapshot' nuance, implying a point-in-time read rather than history, but says nothing about staleness, behavior for an unknown pool, or whether the value is orderbook-derived.

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 a single specific sentence stating the action, followed by a scoping sentence. The exclusion list is somewhat long and mixes genuinely adjacent concepts with clearly unrelated ones, but the whole definition stays short and readable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is not required, and the description correctly bounds scope. However, for a one-parameter tool with zero schema coverage, an agent still lacks poolKey format guidance and any hint about failure modes.

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?

A single parameter with 0% schema description coverage, so the description should carry the burden but only implies that poolKey identifies a pool. It gives no format guidance (pool ID vs pair label like SUI_USDC) or validity constraints, leaving a practical gap before invocation.

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?

States a concrete verb and resource: 'Return a DeepBook pool mid-price snapshot.' The negative list narrows what it is not (price impact, route quality, global market price), but it never names the actual sibling it sits closest to, such as read_get_deepbook_usdc_price_at_time or read_inspect_deepbook_orderbook, so differentiation from real alternatives stays 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?

There is no positive when-to-use guidance: no indication of when a spot mid-price is preferable to the time-based price tool or the orderbook inspector. The second sentence lists unrelated exclusions (fiat cash-out, signing readiness), which reads as scope padding rather than routing instruction.

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