Skip to main content
Glama
mcp-server-hyperledger-fabric

mcp-server-hyperledger-fabric

by rene-dekart

Get block by data hash

get_block_by_hash
Read-onlyIdempotent

Locates a Fabric block by its 64-character data hash by scanning forward from a chosen start block, then returns the block summary.

Instructions

Find a block by its data hash by scanning blocks forward from startBlock. Returns the block summary.

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": {
      "channel": "<channel>",
      "hash": "<hash>"
    },
    "name": "get_block_by_hash"
  }
}

Input Schema

NameRequiredDescriptionDefault
hashYesBlock data hash (hex, 64 chars)
channelYesFabric channel name
maxBlocksNoScan at most this many blocks
timeoutMsNo
startBlockNoScan from this block

Output Schema

NameRequiredDescriptionDefault
hashNo
foundYes
txIdsNo
numberNo
scannedNo
txCountNo
dataHashNo
previousHashNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and openWorld. The description adds genuinely useful behavior: the lookup is a forward linear scan from startBlock, so cost scales with distance, and it returns a block summary. It omits what happens on a miss (no block found) or when maxBlocks/timeout are exhausted.

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?

Two tight sentences, front-loaded with the lookup key and immediately followed by the algorithmic caveat and return value. No filler.

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?

An output schema covers return values and annotations cover the safety profile, so the description only needs the lookup semantics and scan behavior, which it provides. The remaining gap is failure/not-found behavior, which matters for a bounded scan but is a small omission given an output schema exists.

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 80% so most parameters are already documented. The description contributes real meaning: it explains that startBlock is a scan start position and that the search proceeds forward, which tells the agent why startBlock and the scan-bounded parameters matter for performance rather than being arbitrary options.

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?

Names a specific verb and resource ('Find a block by its data hash') and specifies the lookup key, which distinguishes it from a positional sibling like get_block, though it never names that sibling explicitly.

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?

The description implies the scenario (you have a hash, not a block number) but gives no explicit when-to-use/when-not guidance or pointers to get_block for number-based lookups. Usage is inferable rather than stated.

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