Skip to main content
Glama

Get DeFi position history

get_defi_position_history
Read-onlyIdempotent

How the size of one DeFi position changed over the last 24h or 7d, as a series of USD values. Identify the position from a get_defi_positions row: address is the wallet, chain the position's chain id (a numeric EVM chain id, or sui_mainnet), protocol its protocolId, label its label and group its id (labels can repeat within a protocol — e.g. one 'Lending' row per market — and group picks the right one). Values are the position's size at today's prices (the portfolio API does not reprice past states), so the curve shows deposits, withdrawals, accrued debt and rewards — not price moves. range is 24h (13 points · every 2h) or 7d (15 points · every 12h). Each point is one historical portfolio scan, so this call is slow (tens of seconds) — use it for one position at a time.

Input Schema

NameRequiredDescriptionDefault
chainYesChain id: a numeric EVM chain id, or sui_mainnet; tracked chains are 1 Ethereum, 10 Optimism, 56 BNB Chain, 143 Monad, 8453 Base, 42161 Arbitrum, 43114 Avalanche, sui_mainnet Sui
groupNo
labelYes
rangeNo24h
addressYes
protocolYes

Output Schema

NameRequiredDescriptionDefault
rangeYes
pointsYes
targetYes
valuationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / chain / description
      Previous value: -"Chain id: a numeric EVM chain id, or sui_mainnet; tracked chains are 1 Ethereum, 56 BNB Chain, 8453 Base, 42161 Arbitrum, sui_mainnet Sui"New value: +"Chain id: a numeric EVM chain id, or sui_mainnet; tracked chains are 1 Ethereum, 10 Optimism, 56 BNB Chain, 143 Monad, 8453 Base, 42161 Arbitrum, 43114 Avalanche, sui_mainnet Sui"
  2. Changed2 schema fields changed
    • addedInput schema / properties / group
      Added value: +{
      +  "maxLength": 300,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedOutput schema / properties / target / properties / groupId
      Added value: +{
      +  "type": "string"
      +}
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent safety, but the description adds far more: latency in tens of seconds, that values use today's prices rather than repricing past states, so the curve reflects flows not price moves, and that each point is one historical portfolio scan. These are non-obvious traits an agent needs before calling.

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-loads what the tool returns, then identification, then semantics, then the latency caveat – a sensible order with no filler. It is dense and long, but nearly every clause carries information the agent could not get from the schema.

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?

Given six parameters, low schema coverage, and an output schema that already documents return shape, the description covers identification, cost, and interpretation. The only minor gap is that it does not state behavior when group is omitted despite being non-required, nor what an insufficient-data window returns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 17%, so the description carries the burden and does: it maps address/chain/protocol/label/group to the corresponding fields of a get_defi_positions row, explains that numeric EVM chain ids or sui_mainnet are valid, and clarifies group disambiguates repeated labels like per-market 'Lending' rows. It also gives the range semantics (24h = 13 points every 2h, 7d = 15 points every 12h).

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?

States a specific verb+resource and the exact quantity returned: how the size of one DeFi position changed over 24h/7d as a series of USD values. It also distinguishes itself from get_defi_positions by positioning that tool as the source of the identifying row rather than a substitute.

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

Usage Guidelines4/5

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

Explicitly says to use it for one position at a time because each call is slow (tens of seconds), and tells the agent to derive identifiers from a get_defi_positions row. It stops short of an explicit 'do not use this for current size / use get_defi_positions instead' exclusion, but the context is clear.

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.