Skip to main content
Glama

verify_receipt

Read-only

Verify a CodeRifts signed chain-receipt you ALREADY HOLD: cryptographic authenticity (signature + key id), body binding, and — when lifecycle indices are available — whether it is currently valid authorization (not expired, superseded, or revoked) for a stated operation/target.

Use this when:

  • You already obtained a chain_receipt / receipt token from a prior preflight (or CI artifact) and are about to act (merge/deploy) under that receipt.

  • A contract-gate or policy requires offline/online proof that the receipt is authentic for this change before proceeding.

  • You must distinguish "signature ok" from "currently authorized" (stale or superseded receipts must not be treated as live approval).

Do not use when:

  • You do not have a receipt yet — call coderifts.preflight_change_set first.

  • You need a NEW decision for a changed base→head set — preflight again; verify_receipt does not re-diff specs.

  • The receipt you hold binds a different operation or target than the one you are about to perform — call coderifts.preflight_change_set with context.operation set to that operation (a merge receipt does not authorize a deploy); verify_receipt cannot re-scope or re-issue a decision.

  • You only need human-readable history of an old decision_id without a receipt token — use coderifts.get_decision_details.

  • The change set itself is unknown or incomplete — fix the change set and preflight; do not "verify" a placeholder.

Inputs: receipt token (required); optional intended context (operation, environment, fingerprint, target_id, audience, repository/branch/pull_request, base/head) and the body_hash-bound decision_result envelope. 30s clock-skew leeway on expiry; 0s for destructive operations in production when the intended context declares them. Returns { valid, status, currently_authorized (bool|null), reason, payload, authz_* }. Branch on currently_authorized; null = not evaluated.

When a decision envelope is also in hand (e.g. from a prior preflight), its control_envelope.next_agent_step (if present) is structured remediation guidance the agent MAY follow after a non-CONTINUE decision — still branch on execution_action; next_agent_step is suggestion, not permission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoIntended base commit/ref SHA the receipt must match (signed-wins vs envelope.base)
headNoIntended head commit/ref SHA the receipt must match (signed-wins vs envelope.head)
tokenYesThe chain receipt token (base64url(body).base64url(signature))
branchNoIntended branch the receipt must bind (place binding; optional)
audienceNoIntended audience — must match the receipt
operationNoIntended operation the receipt must authorize (conventional: merge|deploy|tool_call|publish). Triggers authorization evaluation when non-empty; supply decision_result for full scope binding.
target_idNoIntended apply-site target the receipt must bind
repositoryNoIntended repository the receipt must bind (place binding; optional)
environmentNoIntended environment (e.g. production) — must match the receipt
fingerprintNoIntended change fingerprint — must equal the receipt fp
pull_requestNoIntended pull-request id the receipt must bind (place binding; optional)
decision_resultNoThe body_hash-bound decision envelope (carries operation/target/decision). Required for a meaningful AUTHORIZATION evaluation of scope; without it, intended context alone fails closed on authorization (currently_authorized false) while signature status remains independent. Full schema: https://coderifts.com/schemas/decision-result.v1.consumer.json.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
validYestrue iff status is VERIFIED_CURRENT or RETIRED_KEY_VALID_AT_ISSUE
reasonNo
statusYes
payloadNo
authz_noteNoPresent when no intended context supplied: status reflects signature+expiry only
authz_stateNoLifecycle state from isCurrentlyAuthorized when authorization is evaluated (optional; omitted when currently_authorized is null)
authz_reasonNoWhen currently_authorized=false: the deny reason (operation_mismatch, decision_not_allow, superseded, expired, target_mismatch, environment_mismatch, …)
authz_statusNoAuthorization-level status (VERIFIED_WRONG_ENVIRONMENT / VERIFIED_SUPERSEDED / VERIFIED_SCOPE_MISMATCH / …)
caller_valueNoCaller claim that differed from the signed envelope
signed_valueNoSigned envelope slot when signed-wins fail-closed (source_binding_mismatch)
binding_levelNoplace_and_content | content_only — forensic, not a second verdict
correlation_idNoRoute-owned trace id (ID828); always a non-empty string on 200
currently_authorizedYesWhether the receipt currently authorizes the intended operation/target/fp (§106). null means authorization could not be evaluated (e.g. no intended context) — not unauthorized and not authorized.

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnly annotation, the description reveals the two evaluation modes, fail-closed authorization behavior when the envelope is omitted, clock-skew leeway on expiry, destructive-operation production behavior, the null semantics of currently_authorized, and the advisory nature of next_agent_step. There is no contradiction with the annotations.

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 description is long but well structured and information-dense. Every sentence serves a purpose: the opening defines intent, the do-not-use list prevents misrouting, the inputs and mode behavior explain exact invocation semantics, and the returns are summarized for correct branching.

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 complex two-mode, 12-parameter tool, the description is complete. It covers when to call it, when not to call it, what inputs are required, how the two modes behave, what failure semantics to expect, and what to branch on. Nothing important is left for the agent to guess.

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?

The schema already documents all 12 parameters with 100% coverage, but the description still adds meaningful guidance: token-only mode vs authorization mode, the role of the decision_result envelope, fail-closed behavior when context is supplied without the envelope, and signed-wins binding semantics. It does not merely repeat the schema, though the schema carries much of the parameter-level weight.

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 first sentence names the operation and resource precisely: 'Verify a CodeRifts signed chain-receipt you ALREADY HOLD', and makes clear the result is an authenticity and authorization verdict. It also distinguishes itself from siblings by explicitly saying it does not preflight, re-diff, or re-issue decisions.

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?

The description has explicit 'Use this when' and 'Do not use when' sections. It names preflight_change_set and get_decision_details as alternatives with exact conditions such as 'no receipt yet', 'changed base to head set', 'different operation or target', and 'human-readable history only'.

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.

TDQS

A4.5/5.0
Disambiguation4/5

The three tools have clearly distinct purposes: preflight_change_set creates new decisions, get_decision_details retrieves past decisions, and verify_receipt checks receipt validity. Some semantic overlap exists between get_decision_details and verify_receipt (both inspect prior outcomes), but the detailed usage guidance disambiguates them effectively.

Naming Consistency4/5

Tool names follow a consistent verb_noun pattern (get_decision_details, preflight_change_set, verify_receipt). Minor inconsistency: preflight_change_set uses a compound noun while the others use verb_object, but all are snake_case with clear verbs.

Tool Count4/5

Three tools is a reasonable, minimal surface for an API governance decision workflow: analyze/decide, retrieve past decisions, and verify receipts. The count feels slightly thin for a governance server (e.g., no tool for listing decisions or managing rules), but it is well-scoped for its stated purpose.

Completeness4/5

The core lifecycle is covered: preflight creates the decision, get_decision_details retrieves it, verify_receipt validates authorization. Minor gaps include no explicit analyze-only or authorize-only split (mentioned in the preflight description but not exposed as separate tools) and no listing/cancellation capability.