Skip to main content
Glama

Blocks from height with extras

get_blocks_v1_from_height
Read-onlyIdempotent

Retrieve up to 15 blocks with extended data going backwards from the given height: the published blocks among the 15 heights ending at it, so fewer (or none) past the tip.

Mempool.space docs

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

Input Schema

NameRequiredDescriptionDefault
heightYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed61 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 / Address
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / $defs / BlockExtras / properties / avgTxSize / format
      Removed value: -"double"
    • addedOutput schema / $defs / BlockExtras / properties / coinbaseAddress / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/Address"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / $defs / BlockExtras / properties / coinbaseAddress / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • addedOutput schema / $defs / BlockExtras / properties / coinbaseAddresses / items / $ref
      Added value: +"#/$defs/Address"
    • removedOutput schema / $defs / BlockExtras / properties / coinbaseAddresses / items / type
      Removed value: -"string"
    • addedOutput schema / $defs / BlockExtras / properties / coinbaseBip54
      Added value: +{
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / $defs / BlockExtras / properties / coinbaseRaw / allOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/Hex"
      +  }
      +]
    • removedOutput schema / $defs / BlockExtras / properties / coinbaseRaw / type
      Removed value: -"string"
    • addedOutput schema / $defs / BlockExtras / properties / expectedFees
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/Sats"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / $defs / BlockExtras / properties / expectedWeight
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/Weight"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / $defs / BlockExtras / properties / firstSeen / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/Timestamp"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / $defs / BlockExtras / properties / firstSeen / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / BlockExtras / properties / firstSeen / minimum
      Removed value: -0
    • removedOutput schema / $defs / BlockExtras / properties / firstSeen / type
      Removed value: -[
      -  "integer",
      -  "null"
      -]
    • addedOutput schema / $defs / BlockExtras / properties / header / allOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/Hex"
      +  }
      +]
    • removedOutput schema / $defs / BlockExtras / properties / header / type
      Removed value: -"string"
    • addedOutput schema / $defs / BlockExtras / properties / matchRate
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedOutput schema / $defs / BlockExtras / properties / orphans / items / $ref
      Added value: +"#/$defs/BlockOrphan"
    • removedOutput schema / $defs / BlockExtras / properties / orphans / items / type
      Removed value: -"string"
    • addedOutput schema / $defs / BlockExtras / properties / pool / $ref
      Added value: +"#/$defs/BlockPool"
    • removedOutput schema / $defs / BlockExtras / properties / pool / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/BlockPool"
      -  }
      -]
    • removedOutput schema / $defs / BlockExtras / properties / segwitTotalSize / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / BlockExtras / properties / segwitTotalTxs / format
      Removed value: -"uint32"
    • addedOutput schema / $defs / BlockExtras / properties / segwitTotalWeight / $ref
      Added value: +"#/$defs/Weight"
    • removedOutput schema / $defs / BlockExtras / properties / segwitTotalWeight / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/Weight"
      -  }
      -]
    • removedOutput schema / $defs / BlockExtras / properties / totalInputs / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / BlockExtras / properties / totalOutputs / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / BlockExtras / properties / utxoSetChange / format
      Removed value: -"int64"
    • removedOutput schema / $defs / BlockExtras / properties / utxoSetSize / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / BlockExtras / properties / virtualSize / format
      Removed value: -"double"
    • addedOutput schema / $defs / BlockHash / pattern
      Added value: +"^[0-9a-f]{64}$"
    • removedOutput schema / $defs / BlockInfoV1 / properties / bits / format
      Removed value: -"uint32"
    • removedOutput schema / $defs / BlockInfoV1 / properties / difficulty / format
      Removed value: -"double"
    • addedOutput schema / $defs / BlockInfoV1 / properties / extras / $ref
      Added value: +"#/$defs/BlockExtras"
    • removedOutput schema / $defs / BlockInfoV1 / properties / extras / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/BlockExtras"
      -  }
      -]
    • addedOutput schema / $defs / BlockInfoV1 / properties / height / $ref
      Added value: +"#/$defs/Height"
    • removedOutput schema / $defs / BlockInfoV1 / properties / height / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/Height"
      -  }
      -]
    • addedOutput schema / $defs / BlockInfoV1 / properties / merkle_root / $ref
      Added value: +"#/$defs/MerkleNode"
    • removedOutput schema / $defs / BlockInfoV1 / properties / merkle_root / type
      Removed value: -"string"
    • removedOutput schema / $defs / BlockInfoV1 / properties / nonce / format
      Removed value: -"uint32"
    • removedOutput schema / $defs / BlockInfoV1 / properties / previousblockhash / allOf
      Removed value: -[
      -  {
      -    "$ref": "#/$defs/BlockHash"
      -  }
      -]
    • addedOutput schema / $defs / BlockInfoV1 / properties / previousblockhash / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/BlockHash"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / $defs / BlockInfoV1 / properties / size / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / BlockInfoV1 / properties / tx_count / format
      Removed value: -"uint32"
    • removedOutput schema / $defs / BlockInfoV1 / properties / version / format
      Removed value: -"uint32"
    • changedOutput schema / $defs / BlockInfoV1 / required
      Previous value: -[
      -  "id",
      -  "height",
      -  "version",
      -  "timestamp",
      -  "bits",
      -  "nonce",
      -  "difficulty",
      -  "merkle_root",
      -  "tx_count",
      -  "size",
      -  "weight",
      -  "previousblockhash",
      -  "mediantime",
      -  "extras"
      -]New value: +[
      +  "id",
      +  "height",
      +  "version",
      +  "timestamp",
      +  "bits",
      +  "nonce",
      +  "difficulty",
      +  "merkle_root",
      +  "tx_count",
      +  "size",
      +  "weight",
      +  "mediantime",
      +  "extras"
      +]
    • addedOutput schema / $defs / BlockOrphan
      Added value: +{
      +  "properties": {
      +    "branchlen": {
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    "hash": {
      +      "$ref": "#/$defs/BlockHash"
      +    },
      +    "height": {
      +      "$ref": "#/$defs/Height"
      +    },
      +    "prevhash": {
      +      "allOf": [
      +        {
      +          "$ref": "#/$defs/BlockHash"
      +        }
      +      ]
      +    },
      +    "status": {
      +      "$ref": "#/$defs/BlockOrphanStatus"
      +    }
      +  },
      +  "required": [
      +    "height",
      +    "hash",
      +    "branchlen",
      +    "status",
      +    "prevhash"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / $defs / BlockOrphanStatus
      Added value: +{
      +  "oneOf": [
      +    {
      +      "const": "invalid",
      +      "type": "string"
      +    },
      +    {
      +      "const": "headers-only",
      +      "type": "string"
      +    },
      +    {
      +      "const": "valid-headers",
      +      "type": "string"
      +    },
      +    {
      +      "const": "valid-fork",
      +      "type": "string"
      +    }
      +  ]
      +}
    • removedOutput schema / $defs / BlockPool / properties / blockNumber / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / BlockPool / properties / id / format
      Removed value: -"uint8"
    • removedOutput schema / $defs / Dollars / format
      Removed value: -"double"
    • removedOutput schema / $defs / FeeRate / format
      Removed value: -"double"
    • removedOutput schema / $defs / Height / format
      Removed value: -"uint32"
    • addedOutput schema / $defs / Hex
      Added value: +{
      +  "pattern": "^([0-9a-f]{2})*$",
      +  "type": "string"
      +}
    • addedOutput schema / $defs / MerkleNode
      Added value: +{
      +  "pattern": "^[0-9a-f]{64}$",
      +  "type": "string"
      +}
    • removedOutput schema / $defs / Sats / format
      Removed value: -"uint64"
    • removedOutput schema / $defs / Timestamp / format
      Removed value: -"uint32"
    • removedOutput schema / $defs / Weight / format
      Removed value: -"uint32"
  2. First observed

TDQS

A3.7/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 open-world behavior, so the description is not burdened with safety disclosure. It adds genuinely useful behavioral detail beyond annotations: a hard cap of 15 blocks, backward traversal, and that only published blocks among the 15 heights are returned so results are fewer or empty past the tip. It does not discuss ordering of the returned blocks or pagination, but the output schema likely covers structure.

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 core behavior is front-loaded in one dense sentence, followed by a docs reference and REST operation mapping. No sentence is wasted and the boundary condition is included without bloat.

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 annotations covering safety and an output schema covering return structure, the description supplies the essential calling semantics: direction, cap, and tip behavior. The notable omission is sibling differentiation, which leaves a gap in a very crowded block-related namespace.

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?

The single height parameter is documented in the schema, yet the description adds crucial meaning: height is the ending/top height of the range, not the starting point, and traversal goes backwards. That resolves the main ambiguity an agent could have when passing the parameter.

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 with scope: retrieve up to 15 blocks with extended data going backwards from a given height. The 15-block cap and backwards direction are clear. However, it never distinguishes itself from near-identical siblings such as get_blocks_v1 and get_blocks_from_height, which an agent must disambiguate by schema inspection alone.

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 explicit when-to-use or when-not-to-use guidance and no alternative is named. The scope sentence implies the tool is for height-anchored backward listings, but with dozens of block-related siblings, implied usage is insufficient for reliable selection.

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.