Skip to main content
Glama

Report a purchase

report_purchase

Report a purchase you made after Sealgraf allowed it, so the receipt seals.

Call it AFTER paying — never before, and never for a purchase that did not happen. It moves no money. Send the preauth_id; add the decision_token when the check itself said allow (after an owner approval, leave it out — Sealgraf already holds it for you). note (what was bought) is required. Always send the amount actually charged (completed_amount_minor, in minor units, not above the allowed amount); add the merchant's order or receipt reference, and optionally a payment object describing how you paid (e.g. rail "link_stripe", virtual_last4, charged_amount_minor, currency, rail_ref {kind, value} such as the Link spend request id, provenance "browser_checkout"). The receipt records your report as reported by the agent. Repeating the call returns the same receipt. Only the connection or key that ran the check can report it. The account comes from your connection, never from call arguments: passing tenant_id, tenant, or tenantId refuses the call.

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": {
      "preauth_id": "<preauth_id>",
      "note": "<note>"
    },
    "name": "report_purchase"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteYes
tenantNo
paymentNo
tenantIdNo
tenant_idNo
preauth_idYes
decision_tokenNo
completed_amount_minorNo
counterparty_receipt_refNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false, openWorldHint=false; the description adds substantial behavior beyond them: no money moves, the receipt is recorded as reported by the agent, repeat calls are idempotent (same receipt), and only the connection or key that ran the check may report. It also warns that tenant_id/tenant/tenantId in arguments will refuse the call, which is non-obvious mutation-side behavior.

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-loaded with purpose and the timing rule, then conditions, then parameter meaning — a sensible order with no filler sentences. It is on the long side and the hard line breaks fragment some sentences, but given nine undocumented parameters the density is largely earned rather than padded.

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?

Covers everything an agent needs for a non-idempotent-annotated write tool with a nested object and no output schema: prerequisites, auth scoping, idempotency, and the fact that the result is a receipt reflecting the agent's report. No return-value schema exists, and the description still tells the caller what repeating the call yields.

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?

With 0% schema description coverage across 9 params including a nested payment object, the description compensates almost fully: it explains decision_token's conditional use, that note is required and means what was bought, that completed_amount_minor is in minor units and must not exceed the allowed amount, that counterparty_receipt_ref is the merchant's order/receipt reference, and it enumerates payment fields (rail, virtual_last4, charged_amount_minor, currency, rail_ref {kind, value}, provenance). It even explains the three tenant alias parameters by saying they must never be passed.

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?

"Report a purchase you made after Sealgraf allowed it, so the receipt seals" states a specific verb (report) and resource (purchase receipt) plus the effect achieved. The ordering language ("after Sealgraf allowed it") separates it from the preceding check tool and from get_receipt, so an agent can place it in the workflow without opening a schema.

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?

Gives explicit when-to-call (after paying), explicit when-not (never before, never for a purchase that did not happen), and a conditional branching rule for decision_token: include it when the check itself said allow, omit it after owner approval. That is precisely the decision an agent needs to make at call time.

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