Skip to main content
Glama

attach_claim_receipt

Attach a receipt to an expense-claim line: a new file (file_base64, the raw bytes, base64) OR an existing document's item_id, exactly one; repeat that item_id as receipt_from_upload when ingest_expense_receipt returned it. override_duplicate only after a duplicate refusal you checked.

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": {
      "company_id": "<company_id>",
      "claim_id": "<claim_id>",
      "line_no": "<line_no>"
    },
    "name": "attach_claim_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
item_idNo
line_noYes
claim_idYes
filenameNoreceipt.pdf
company_idYes
file_base64No
override_duplicateNo
receipt_from_uploadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the load and does disclose non-obvious behavior: the strict XOR between a new upload and an existing document reference, a duplicate-refusal error path with an escape hatch, and the provenance coupling to ingest_expense_receipt. It stops short of saying whether attachment replaces an existing receipt or what success/failure looks like.

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 the action, then rules in priority order with no filler. The nested parentheticals and backtick noise make it denser than it needs to be but nothing is wasted.

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?

For an 8-param mutation tool with no annotations and no output schema, it covers the two mutually exclusive input modes and the duplicate-error path, which are the failure-prone parts. The absence of any statement on return values or on what the plain identifiers mean is a modest remaining gap.

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 0% across 8 params, so the description must compensate and it explains the four tricky ones (file_base64 as raw base64 bytes, item_id as an existing document, receipt_from_upload, override_duplicate) well. company_id, claim_id, line_no, and the filename default are left entirely to naming inference, which is a meaningful gap at this coverage level.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Attach a receipt to an expense-claim line'), which is concrete enough to separate it from the cash-entry receipt sibling by resource scope. It does not explicitly name a sibling tool to contrast with, so it falls short of full differentiation.

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 real conditional guidance: supply exactly one of file_base64 or item_id, reuse the same item_id as receipt_from_upload only when ingest_expense_receipt returned it, and use override_duplicate only after a duplicate refusal you verified. Missing explicit framing of when to prefer this over attach_cash_entry_receipt for non-claim receipts.

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