Skip to main content
Glama

Moneda

attach_receipt

File an unattached receipt against a transaction. A transaction holds at most ONE receipt, so this returns a conflict if another is already attached — detach that one first. Also clears any pending match suggestion, since the user has now decided.

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": {
      "receiptId": "<receiptId>",
      "transactionId": "<transactionId>"
    },
    "name": "attach_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
receiptIdYesReceipt id to attach (from list_receipts output).
transactionIdYesTransaction id to attach it to. Resolve this from get_transactions first — this is the internal id, not the transaction hash.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the one-receipt invariant, the conflict error surfaced when violated, and the side effect of clearing a pending match suggestion. These are exactly the mutation-time surprises an agent needs to know before calling a non-read-only tool.

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?

Three short sentences with zero waste; the action, the invariant and its consequence, and the side effect all arrive in that order. Nothing is repeated from the schema or annotations.

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 two-parameter mutation with full schema coverage and no output schema, the description supplies exactly the missing behavioral context: the conflict condition, the prerequisite detach step, and the suggestion-clearing side effect. Nothing an agent needs to call it correctly is absent.

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% and both parameters are already documented, including the 'internal id, not the transaction hash' note, so the description adds no parameter-level information beyond the schema. Baseline 3 applies.

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 specific verb and resource ('File an unattached receipt against a transaction') and immediately adds the constraining business rule that one transaction holds at most one receipt. The word 'unattached' and the conflict behavior clearly separate it from detach_receipt and confirm_receipt_suggestion.

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?

Gives explicit guidance for the failure case ('detach that one first'), which routes the agent to the sibling detach_receipt, and notes it supersedes a pending match suggestion. It stops short of naming confirm_receipt_suggestion as the alternative when the user has not yet decided, leaving a small inference gap.

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