Skip to main content
Glama

FMF Proof

Deterministic Diff Receipt

diff_receipt

Two JSON documents in; out come a sha256 of each in canonical form, an RFC 6902 patch between them, and a sha256 of the patch. The same two documents always give the same three hashes, so a diff can be quoted and rechecked. Or send a document and a patch to get the result pinned.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diff_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNoThe second JSON document (to make a patch).
patchNoOr: an RFC 6902 patch to apply to before (add, remove, replace).
beforeNoThe first JSON document.
expected_patch_sha256NoOptional: a patch hash someone quoted to you, to compare.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does disclose meaningful behavior: canonical-form hashing, determinism ('the same two documents always give the same three hashes'), and the purpose of quoting a hash to recheck. It stops short of stating what a hash mismatch or a failed patch application produces, which leaves error semantics unstated.

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?

Three short sentences with the output contract front-loaded and the alternate mode last; nothing is padding. The closing phrase 'get the result pinned' is a little colloquial and costs a moment of interpretation.

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?

There is no output schema, so the description must and does enumerate the three returned hashes and the patch, plus the determinism guarantee. What is missing for a four-optional-parameter tool is guidance on valid parameter combinations and failure behavior.

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 100%, so the baseline is 3, but the description adds mode-level meaning the schema cannot: before+after produces a patch, before+patch produces a pinned result. It only lightly gestures at expected_patch_sha256 ('a patch hash someone quoted to you, to compare') without saying whether a mismatch errors or is reported.

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?

The description states a specific verb and resource: it takes two JSON documents and emits canonical sha256s plus an RFC 6902 patch and its hash, and it also supports an apply-patch mode. That is concrete enough to distinguish it from siblings like notary_commit or schema_drift, though it never names an alternative 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 two operating modes are implied by 'Two JSON documents in' versus 'Or send a document and a patch', which is useful routing information. However, with zero required parameters and four optional ones, the description never says what happens if neither combination is supplied, whether both can be, or when to prefer this over a sibling verification tool.

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.

Resources