Skip to main content
Glama

Moneda

finalize_receipt_upload

Step 2 of 2 for uploading a local receipt file. Pass the uploadKey returned from request_receipt_upload AFTER you've executed the curlCommand to PUT the file to S3. Validates the staged file, runs OCR + LLM extraction, attempts to auto-match to an existing transaction, and persists line items. Returns receiptId, optional billId (for invoice-shaped docs), and matched/suggested/transactionId.

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": {
      "uploadKey": "<uploadKey>"
    },
    "name": "finalize_receipt_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
uploadKeyYesThe opaque signed key returned by request_receipt_upload.
captureSourceNoProvenance label for the audit trail. Defaults to MANUAL_UPLOAD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description goes well beyond them by disclosing the internal pipeline (file validation, OCR + LLM extraction, auto-match attempt, line-item persistence) and the side effects of persisting data. It stops short of covering failure modes such as an expired or already-consumed uploadKey, which would be the remaining gap for a mutating 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?

Four tight sentences with the sequencing constraint front-loaded, followed by processing behavior and return fields. Nothing is redundant with the title or the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description responsibly enumerates the return shape (receiptId, optional billId, matched/suggested/transactionId), which is otherwise unavailable to the agent. It omits error/retry behavior for a multi-step upload flow, which is the one missing piece for full completeness.

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, but the description adds genuine meaning beyond the schema by specifying that uploadKey must come from request_receipt_upload and only be used after the S3 PUT succeeds. The optional captureSource parameter is left to the schema and is not mentioned in the description.

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 ('finalize_receipt_upload', 'Step 2 of 2 for uploading a local receipt file') and explicitly positions itself against the sibling that precedes it, request_receipt_upload. An agent can distinguish it from attach_receipt, import_receipt_from_url, and request_receipt_upload without opening any 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 an explicit precondition and ordering: call only AFTER the curlCommand PUT to S3, passing the uploadKey from request_receipt_upload. This is exactly the conditional routing an agent needs, and the alternative (step 1) is named.

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