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

mcp-server-hyperledger-fabric

by rene-dekart

Get chaincode events

get_chaincode_events
Read-onlyIdempotent

Read recent Hyperledger Fabric chaincode events by channel and chaincode, returning event names, transactions, blocks, and payloads. Filter by event name or start block to inspect ledger activity.

Instructions

Read recent chaincode events from the Fabric ledger (event name, transaction, block, payload).

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>",
      "chaincode": "<chaincode>"
    },
    "name": "get_chaincode_events"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
channelYesFabric channel name
chaincodeYesChaincode name
eventNameNoFilter by exact event name
timeoutMsNo
startBlockNo

Output Schema

NameRequiredDescriptionDefault
eventsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint, so safety and repeatability are covered. The description adds that results are scoped to 'recent' events and enumerates the returned fields, but does not disclose ordering, how far back 'recent' reaches, or that a peer/gateway connection is required for the open-world read.

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?

A single tight sentence that front-loads the verb and resource, with the returned field list as a useful parenthetical. It is not wasteful, though the parentheses could have carried more valuable scoping detail instead of a bare field list.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has six parameters, a real output schema, and an open-world read against a ledger, yet the description never addresses ordering, pagination via limit, the meaning of startBlock versus recency, or failure modes such as a missing channel. For this complexity the one-line description leaves meaningful gaps, though the output schema relieves it of explaining return shape.

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

Parameters3/5

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

Schema coverage is 50%, with channel, chaincode and eventName documented in the schema, leaving limit, timeoutMs and startBlock undocumented there. The description compensates only partially, naming event name as a filter concept but saying nothing about limit semantics, timeout behavior, or how startBlock interacts with 'recent' events.

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: 'Read recent chaincode events from the Fabric ledger', and lists what each event carries (event name, transaction, block, payload). It distinguishes itself implicitly from write siblings like invoke_chaincode and endorse_chaincode, but never names a sibling or contrasts with get_block/get_transaction.

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?

No explicit when-to-use guidance, no exclusions, and no mention of alternatives such as get_block or get_transaction for block-level inspection. The only usage signal is the word 'recent', which hints at recency but never explains what happens to older events or how startBlock relates to 'recent'.

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