Skip to main content
Glama

Blocks from height

get_blocks_from_height
Read-onlyIdempotent

Retrieve up to 10 blocks going backwards from the given height. For example, height=100 returns blocks 100, 99, 98, ..., 91. Height=0 returns only block 0. A height past the tip is not found.

Mempool.space docs

REST operation: GET /api/blocks/{height}.

Input Schema

NameRequiredDescriptionDefault
heightYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changed
    • changedInput schema / $defs / Height / description
      Previous value: -"Block height"New value: +"A block height: how many blocks came before it."
    • removedInput schema / $defs / Height / format
      Removed value: -"uint32"
    • addedOutput schema / $defs / BlockHash / pattern
      Added value: +"^[0-9a-f]{64}$"
    • removedOutput schema / $defs / BlockInfo / properties / bits / format
      Removed value: -"uint32"
    • removedOutput schema / $defs / BlockInfo / properties / difficulty / format
      Removed value: -"double"
    • addedOutput schema / $defs / BlockInfo / properties / height / $ref
      Added value: +"#/$defs/Height"
    • removedOutput schema / $defs / BlockInfo / properties / height / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/Height"
      -  }
      -]
    • addedOutput schema / $defs / BlockInfo / properties / merkle_root / $ref
      Added value: +"#/$defs/MerkleNode"
    • removedOutput schema / $defs / BlockInfo / properties / merkle_root / type
      Removed value: -"string"
    • removedOutput schema / $defs / BlockInfo / properties / nonce / format
      Removed value: -"uint32"
    • removedOutput schema / $defs / BlockInfo / properties / previousblockhash / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/BlockHash"
      -  }
      -]
    • addedOutput schema / $defs / BlockInfo / properties / previousblockhash / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/BlockHash"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / $defs / BlockInfo / properties / size / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / BlockInfo / properties / tx_count / format
      Removed value: -"uint32"
    • removedOutput schema / $defs / BlockInfo / properties / version / format
      Removed value: -"uint32"
    • changedOutput schema / $defs / BlockInfo / required
      Previous value: -[
      -  "id",
      -  "height",
      -  "version",
      -  "timestamp",
      -  "bits",
      -  "nonce",
      -  "difficulty",
      -  "merkle_root",
      -  "tx_count",
      -  "size",
      -  "weight",
      -  "previousblockhash",
      -  "mediantime"
      -]New value: +[
      +  "id",
      +  "height",
      +  "version",
      +  "timestamp",
      +  "bits",
      +  "nonce",
      +  "difficulty",
      +  "merkle_root",
      +  "tx_count",
      +  "size",
      +  "weight",
      +  "mediantime"
      +]
    • removedOutput schema / $defs / Height / format
      Removed value: -"uint32"
    • addedOutput schema / $defs / MerkleNode
      Added value: +{
      +  "pattern": "^[0-9a-f]{64}$",
      +  "type": "string"
      +}
    • removedOutput schema / $defs / Timestamp / format
      Removed value: -"uint32"
    • removedOutput schema / $defs / Weight / format
      Removed value: -"uint32"
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered. The description adds real behavior beyond that: the 10-block cap, descending order, and the two edge cases (genesis and past-tip returning not found).

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 core rule and examples are front-loaded in two tight sentences; the docs link and REST operation line are minor overhead but not wasteful. Nothing essential is buried.

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 an output schema present, the description needn't describe return values, and for a single-parameter read tool the explanation of range, ordering and edge cases is nearly sufficient. Only the ambiguity versus the sibling from-height tool remains unaddressed.

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 description coverage is reported as 0%, so the description must carry the load, and it does: it defines the height parameter through a worked example (100 yields 100..91) and explains what height=0 means. It doesn't add format constraints beyond the schema's integer/minimum, but the semantics are covered.

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 specific verb and resource ('Retrieve up to 10 blocks going backwards from the given height') and pins down the direction and cap. It is distinct from get_block (single block) though it does not differentiate itself from the near-identical sibling get_blocks_v1_from_height.

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?

Boundary conditions are spelled out (height=0 returns only block 0; past the tip is not found), which helps an agent avoid errors, but there is no explicit statement of when to pick this over get_blocks or get_blocks_v1_from_height. Usage is implied rather than routed.

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.