Skip to main content
Glama

get_decision_details

Read-only

Retrieve a PAST CodeRifts decision by decision_id (or fingerprint): full report payload, breaking changes list, scores, and linked receipt metadata if stored.

Use this when:

  • You have a decision_id (or fingerprint) from a previous preflight, PR comment, or CI log and need to inspect or explain that past decision.

  • You are auditing why a prior ALLOW/WARN/BLOCK was issued.

  • You are NOT requesting a new analysis of current before/after specs.

Do not use when:

  • You need a decision for the CURRENT uncommitted or PR head change set — call coderifts.preflight_change_set with the current artifacts.

  • You hold a receipt token and only need cryptographic/lifecycle verification — use coderifts.verify_receipt.

  • You have no decision_id/fingerprint — run preflight first to create one.

Inputs: at least one of decision_id (preferred) or fingerprint is required (empty {} is rejected by the server as INVALID_INPUT). Returns the stored decision document or not_found.

Scoping — fingerprint lookup returns only YOUR OWN decisions. A fingerprint is derived from content, not from an account, so two callers who preflight byte-identical specs derive the same one; the lookup is therefore constrained to the decisions your credential can prove it owns.

A decision that exists but is not yours returns the SAME not_found as one that was never issued. This is deliberate: a distinguishable "exists but forbidden" would confirm to any caller that a given content hash had been decided on by someone, which is the fact the scoping exists to withhold. Do not read not_found as proof that no such decision exists anywhere.

Decisions persisted without context.repository cannot currently be attributed to an account, and are not retrievable by fingerprint at all — not by their owner either. Retrieve those by decision_id, which is unchanged and unscoped. This is a limitation of what older stored rows carry, not a property of the lookup: rows written from now on record the account directly, so the gap narrows as older rows age out. If a fingerprint you expect returns not_found, use the decision_id before concluding the decision is missing.

When the stored envelope carries control fields, control_envelope.next_agent_step is structured remediation guidance the agent MAY follow for non-CONTINUE execution_action values (null on CONTINUE*). Still branch on execution_action; next_agent_step is a suggestion, not permission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
decision_idNoThe decision_id from a prior decision_result envelope. Provide this and/or fingerprint (at least one non-empty string required).
fingerprintNoA verdict fingerprint (sha256:...); returns the latest matching decision. Provide this and/or decision_id (at least one non-empty string required).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaYes
decisionNo
evidenceNo
patternsNo
operationNo
timestampNo
risk_scoreNo
receipt_kindNo
chain_receiptNo
preflight_modeNo
safe_for_agentNo
decision_resultYesdecision-result.v1 envelope (control enums closed). Additive fields may appear and are not permission. Full schema: https://coderifts.com/schemas/decision-result.v1.consumer.json (producer: https://coderifts.com/schemas/decision-result.v1.producer.json).
pattern_sourcesNo
breaking_changesNo
control_envelopeNoControl envelope (control/1.0) derived from the stored decision_result. Includes next_agent_step (structured remediation SUGGESTION for non-CONTINUE execution_action; null on CONTINUE*; not permission — still branch on execution_action).
evidence_qualityNo
execution_actionNo
coderifts_versionNo
requires_migrationNo
verdict_fingerprintNo
required_action_coreNoBranchable required-action core { type, reason_code, recheck_required } when present on the envelope.
decision_spec_versionNo
decision_semantic_hashNo

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, but the description adds substantial non-obvious behavior: fingerprint scoping to own decisions, deliberate identical not_found for forbidden lookups, legacy rows not retrievable by fingerprint, and the meaning of control_envelope.next_agent_step. This goes well beyond what annotations provide.

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?

The description is well-structured with clear sections and front-loaded purpose, but it is quite lengthy and includes some details that slightly overlap with the schema (e.g., empty {} rejection) and an extended legacy-row explanation that could be tightened. Still, nearly every sentence carries useful behavioral information.

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?

Given the tool's complexity (scoped lookups, legacy limitations, not_found semantics, control_envelope hints), the description covers all critical aspects an agent needs to call it correctly. The presence of an output schema means return-value details do not need to be in the description.

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

Parameters5/5

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

Although the input schema has 100% parameter coverage, the description adds meaningful semantics beyond it: decision_id is preferred, fingerprint is content-derived and scoped to the caller's own decisions, decision_id is unscoped, and a fallback strategy is provided when fingerprint returns not_found. This enhances the agent's ability to choose and combine the parameters correctly.

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 names a specific verb ('Retrieve'), a clear resource ('a PAST CodeRifts decision'), and the key identifiers (decision_id or fingerprint). It explicitly enumerates what the payload contains (report, breaking changes, scores, receipt metadata) and distinguishes itself from sibling tools by focusing on past 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 provides explicit 'Use this when' and 'Do not use when' sections, naming the exact alternatives (preflight_change_set, verify_receipt) and the conditions that trigger them. This is the clearest possible routing guidance for an agent.

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.