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

mcp-server-hyperledger-fabric

by rene-dekart

Endorse chaincode (dry run, no commit)

endorse_chaincode
Read-onlyIdempotent

Endorse a chaincode transaction without submitting it to the orderer or committing to the ledger, so you can check a write will pass before invoking it.

Instructions

Validate a chaincode transaction by endorsing it without submitting to the orderer. Nothing is committed. Use to check a write will pass before invoking.

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>",
      "method": "<method>"
    },
    "name": "endorse_chaincode"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNoString args; JSON-encode objects
methodYesChaincode function, e.g. GetAsset
channelYesFabric channel name
contractNoContract name within chaincode (optional)
chaincodeYesChaincode name
transientDataNoPrivate data, not recorded on the ledger

Output Schema

NameRequiredDescriptionDefault
resultYesEndorsement result, decoded as UTF-8; nothing was committed
transactionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/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 the safety profile is covered. The description adds the mechanism (endorsement goes to peers, never to the orderer), but says nothing about what a failed endorsement returns or whether specific peer/permission conditions must be met.

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 short sentences: the first front-loads the action and the no-commit guarantee, the second supplies usage guidance. Nothing is redundant or padding.

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 and full parameter documentation, the description only needs to convey purpose, safety and usage — all of which it does. The main omission is failure behavior when endorsement is rejected by peers.

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 description coverage is 100%, so all six parameters including transientData and args are already documented in the schema. The description adds no parameter meaning beyond that, which is the expected baseline when the schema carries the burden.

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: endorsing a chaincode transaction without submitting to the orderer. The dry-run/no-commit scope clearly separates it from invoke_chaincode, though the sibling is only implied, not named.

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?

'Use to check a write will pass before invoking' gives explicit when-to-use guidance that points at the invoke sibling as the alternative. It stops short of stating when-not-to-use (e.g., for read-only queries, where query_chaincode would be cheaper).

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