Skip to main content
Glama

Market totals over time (v4)

get_market_history
Read-only

v4 only. Deposits, borrows, available liquidity and utilisation over a window, for one hub or one spoke. Pick the layer deliberately: a hub is the liquidity itself and answers 'is this market growing', a spoke is one venue onto that liquidity and answers 'is this venue being used'. Ids come from get_reserve_details, which returns both 'hubId' and 'spokeId' for a reserve, or from get_hubs ('hubId') and get_user_positions ('spokeId' for a spoke the wallet already holds). The two are not interchangeable and the wrong one is rejected. To judge a venue before entering it, take the ids from get_reserve_details rather than from a position that does not exist yet. For the protocol as a whole rather than one market use get_protocol_history, for one reserve's rate use get_apy_history, and for one asset across every reserve holding it use get_asset_history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe hubId (scope 'hub') or spokeId (scope 'spoke'). Not an address.
scopeYesWhich layer 'id' names: a hub's liquidity, or one spoke onto it.
windowNoHow far back to go (default week).
versionNoOptional, and only 'v4': this tool exists on v4 only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds useful behavioral context: it is v4-only, rejects mismatched scope/id combinations ('wrong one is rejected'), and clarifies that IDs are not addresses. This goes beyond what annotations provide, though it does not discuss output shape or pagination.

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?

The description is dense but every sentence earns its place: version, output metrics, hub/spoke distinction, ID provenance, rejection warning, and explicit alternatives are all packed in without redundancy. It is front-loaded with the essential purpose and scales up with useful guidance.

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 read-only history tool with no output schema, the description covers the critical selection pitfalls (scope, id source, version) and routes to related tools. It does not describe the return value format, which is a minor gap given the name implies a time series, but the core decision factors are fully addressed.

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 100%, so the baseline is 3. The description adds meaningful semantics by explaining the conceptual difference between hub and spoke ('hub is the liquidity itself... spoke is one venue onto that liquidity') and where to source each ID. This helps agents select and populate parameters correctly beyond the schema's enum descriptions.

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 immediately states the exact resource and metrics ('Deposits, borrows, available liquidity and utilisation over a window, for one hub or one spoke') and distinguishes it from sibling tools by naming get_protocol_history, get_apy_history, and get_asset_history as alternatives. This removes any ambiguity about the tool's role.

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?

Provides explicit when-to-use guidance: hub vs spoke semantics ('hub is the liquidity itself... spoke is one venue onto that liquidity'), where to get IDs (get_reserve_details, get_hubs, get_user_positions), and when to prefer alternatives. Also cautions against using a non-existent position ID when evaluating a new venue, which is actionable.

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