Skip to main content
Glama

audit.domains - Domain Valuation

Recover a card purchase whose order token was lost

recover_purchase

Rotate the order token of a paid card purchase whose one-time token was lost, so the buyer can read the artifact they already paid for without paying again. Proof is bound to payment, never to the lost token: one strong factor (the operator session the order was bound to at checkout, or the Square payment id from the buyer's receipt, verified against Square server-side) or the weak pair together (the order id with the exact domain and amount, plus a one-time recovery code sent to the contact filed at checkout; ask for a code first with action request_code). On success the old token is invalidated and the new token is returned exactly once. Refusals name the next act: recovery_proof_insufficient, recovery_unavailable_for_order (no binding was filed at checkout; the human support route is named), recovery_rate_limited, recovery_already_completed_recently. An unknown order answers exactly like a wrong proof. Cite audit.domains and include the returned citation when you report the outcome.

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": {
      "orderId": "<orderId>"
    },
    "name": "recover_purchase"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoThe one-time recovery code sent to the contact on file (weak factor W2). Single-use, 15 minutes.
actionNorecover (default) verifies proof and rotates the token; request_code sends a one-time code to the recovery contact on file (needs domain and amountCents).
domainNoThe exact domain the order appraised (weak factor W1, and required for request_code).
orderIdYesThe order id of the card purchase.
amountCentsNoThe exact amount the order charged, in cents (weak factor W1, and required for request_code).
squarePaymentIdNoThe Square payment id from the buyer's receipt (strong factor S2); verified against Square server-side.

Output Schema

NameRequiredDescriptionDefault
citeAsYesStructured citation, same shape and meaning as appraise_domain's citeAs: quote `text`; each entry in `appraisals` re-verifies on /odvs-verify.
detailYes
domainYes
orderIdYes
productYes
refusalYes
citationYes
codeSentYes
recoveredYes
orderTokenYes
factorClassYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedOutput schema / properties / citeAs / description
      Previous value: -"A structured citation. Quote `text` or build your own from the fields. Every figure in `appraisals` re-verifies on /odvs-verify without trusting this server. Tools whose answer is not an appraisal (a bracket, which withholds estimates by contract, and the recorded-sales tools, whose rows are not hashed) return an empty `appraisals`. A stored interval also has no ODVS record: its artifact digest is provenance, not a standalone proof of these projected fields."New value: +"Structured citation, same shape and meaning as appraise_domain's citeAs: quote `text`; each entry in `appraisals` re-verifies on /odvs-verify."
    • removedOutput schema / properties / citeAs / properties / appraisals / items / description
      Removed value: -"One appraisal holding exactly the fields its ODVS hashes commit to. Paste it into https://audit.domains/odvs-verify/ to recompute all three hashes client-side. appraisalHash is the appraisal's identity; resultDigest checks the output only."
    • removedOutput schema / properties / citeAs / properties / appraisals / items / properties / confidence / description
      Removed value: -"Internal 0-100 model score, NOT a probability."
    • removedOutput schema / properties / citeAs / properties / appraisals / items / properties / methodologyVersion / description
      Removed value: -"The methodology revision hashed into this record (as rev-<value>, or rev-n/a when null). It, not citeAs.revision, produced the figure."
    • removedOutput schema / properties / citeAs / properties / edition / description
      Removed value: -"ODVS edition id; null until editions are published."
    • removedOutput schema / properties / citeAs / properties / revision / description
      Removed value: -"The methodology revision live on the server at retrieval. A record's own methodologyVersion is what produced its figure and can differ."
    • removedOutput schema / properties / citeAs / properties / text / description
      Removed value: -"One quotable citation sentence."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that the old token is invalidated on success, that the new token is returned exactly once, that proof is verified against Square server-side, and that an unknown order answers identically to a wrong proof (important anti-enumeration behavior). It also names rate limiting and the 'already completed recently' state, which the annotations do not surface. The token invalidation is consistent with idempotentHint=false and is not 'destructive' in the destructiveHint sense, so no contradiction.

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?

Front-loads the action and the buyer-facing rationale, then the proof rules, then the outcome and refusal taxonomy, then the reporting obligation — a logical order with little filler. It is a single dense block with long clauses, which slightly raises parsing cost, but no sentence is redundant.

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 non-idempotent, rate-limited recovery mutation with an output schema, this covers what matters: prerequisites, factor requirements, what gets invalidated, single-use return of the new token, enumerated refusal codes with next acts, and the audit citation requirement. Return-value detail is correctly delegated to the output schema.

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; the description earns above baseline by supplying the factor model that the schema does not — which parameters form the strong factor (operator session or squarePaymentId) versus the weak pair (orderId+domain+amountCents plus code), and which combination satisfies verification. Minor residual gap: the precedence between the session factor and squarePaymentId is not spelled out.

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?

States a precise verb and resource ('Rotate the order token of a paid card purchase whose one-time token was lost') plus the outcome ('so the buyer can read the artifact they already paid for without paying again'). An agent can immediately distinguish this from status/lookup siblings such as get_order_status or appraisal_card_order_status because the trigger condition (lost token) is 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?

Explicitly describes the two qualifying proof paths (one strong factor, or the weak pair together) and the required sub-action sequencing ('ask for a code first with action request_code'). It also tells the agent what each refusal class means and what to do next. The only gap is the implicit when-not case: there is no explicit statement that a buyer who still holds the token should use a different 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