Skip to main content
Glama

Verify RFC 8785 & Ed25519 Audit Receipt Integrity

verify_audit_receipt
Read-onlyIdempotent

Recompute the RFC 8785 canonical SHA-256 digest and verify any Ed25519 signature (using the active server key or caller-supplied JWKS public_key_x_b64url) for an anonymized payload and audit_receipt from evaluate_timesheet. USE THIS TOOL WHEN proving zero tampering on an existing receipt; DO NOT use to run payroll math (evaluate_timesheet). Read-only, stateless, zero-PII; returns verified=false on mismatch without throwing.

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": {
      "payload": "<payload>",
      "audit_receipt": "<audit_receipt>"
    },
    "name": "verify_audit_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
payloadYesExact anonymized JSON request object previously submitted to evaluate_timesheet (key order and UTC offset format may vary; canonicalized via RFC 8785 JCS). Must contain zero employee PII (triggers PII_PAYLOAD_REJECTED otherwise).
audit_receiptYesReceipt object returned by evaluate_timesheet containing receipt_id, evaluated_at_utc, ruleset_version, 64-char hex input_sha256, and optional Ed25519 signature fields (signature_alg, key_id, signature_b64url).
public_key_x_b64urlNoOptional unpadded base64url-encoded 32-byte Ed25519 public key (the 'x' field from GET /.well-known/jwks.json). Required only for offline signature checks when the server has no active signing key configured; ignored for unsigned receipts.

Output Schema

NameRequiredDescriptionDefault
verifiedYesOverall integrity verdict: True iff hash_verified is True and (no signature is present OR signature_verified is True).
disclaimerNoMandatory non-legal-advice UPL disclaimer.Deterministic statutory calculation for audit assistance only; not legal advice.
receipt_idYesReceipt identifier from the supplied AuditReceipt.
hash_verifiedYesTrue iff recomputed RFC 8785 SHA-256 matches audit_receipt.input_sha256.
computed_sha256YesRecomputed RFC 8785 canonical JSON SHA-256 hex digest of payload.
expected_sha256YesSHA-256 hex digest claimed inside audit_receipt.input_sha256.
ruleset_versionYesRuleset version recorded in the supplied AuditReceipt.
signature_presentYesTrue when the receipt includes an Ed25519 cryptographic signature.
signature_verifiedNoTrue/False when an Ed25519 signature was verified against an active or supplied public key; null when the receipt is unsigned or no matching public key is available.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that the tool is stateless, zero-PII, and returns verified=false on mismatch rather than throwing. It also explains the two signature-verification paths, active server key or caller-supplied JWKS key, which materially affects invocation behavior.

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 definition is compact and front-loaded: purpose first, explicit usage guidance next, then operational traits. Every sentence carries useful information, and the failure-mode note is placed efficiently at the end.

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

Completeness5/5

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

For a cryptographic verification tool with nested inputs and an output schema, the description covers the essential context: what is verified, how signatures are checked, what input is expected, and what happens on mismatch. Return-value fields can be left to the output schema.

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 the heavy parameter documentation is already handled by the schema. The description adds useful framing, such as the payload being the same anonymized object previously submitted to evaluate_timesheet and the public key being an alternative verification source, but most field-level meaning remains in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb-and-resource pair: recompute an RFC 8785 canonical SHA-256 digest and verify an Ed25519 signature for a payload and audit_receipt. It explicitly contrasts itself with evaluate_timesheet, so an agent can distinguish verification from payroll computation without inspecting schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit when-to-use condition, proving zero tampering on an existing receipt, and an explicit when-not-to-use condition, running payroll math via evaluate_timesheet. The key-selection context for server-key versus caller-supplied JWKS verification further narrows the correct invocation.

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