Skip to main content
Glama

log_purchase

Record a card purchase, calculate the rewards it earns, and check whether another card in the wallet would have earned more.

Instructions

Record a purchase made on a card and calculate the rewards it earned. Also says whether another card in the wallet would have earned more.

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": {
      "card": "<card>",
      "amount": "<amount>",
      "merchant": "<merchant>"
    },
    "name": "log_purchase"
  }
}

Input Schema

NameRequiredDescriptionDefault
cardYesCard id, or its name (a unique part is enough)
noteNo
amountYesAmount in ₹
channelNooffline
categoryNoSpending category, see the smartcard://categories resource. Leave empty to guess from a well-known merchant.
merchantYes
spent_onNoYYYY-MM-DD, defaults to today

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotations only declare readOnlyHint=false and destructiveHint=false, and the description is consistent with them by framing this as a recording (write) action. It usefully discloses the side effects of computing rewards and cross-checking the rest of the wallet, which is more than the annotations provide, but it says nothing about duplicate purchases, whether logging changes the rewards balance materially, or whether the comparison is advisory only and never moves the purchase to another card.

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?

Two short sentences with the primary action front-loaded and zero filler. The second sentence's 'Also says whether' is slightly loose phrasing for 'returns a comparison', but the information density is good.

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

Completeness3/5

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

With seven parameters, a mutation annotation pair and an output schema, the description is only just adequate: the output schema relieves it of explaining return values, but it omits the duplicate-entry behavior, prerequisite card existence, and the meaning of the comparison result that an agent would want before calling a write tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 57%, and the description contributes no parameter meaning at all – it never mentions card, amount, merchant, category, channel, note, or spent_on, nor the ₹ currency or the well-known-merchant category guessing. Three parameters (note, channel, merchant) have no schema description, so the description had room to compensate and does not.

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?

The description states a specific verb and resource ('Record a purchase made on a card') and adds two concrete behaviors: calculating earned rewards and comparing against other cards in the wallet. It does not name any sibling, but the write-and-compare scope is distinct enough from list_purchases or recommend_card for an agent to recognize.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the verb 'Record' – use it when a purchase actually happens – and the comparison clause hints at a relationship with recommend_card, but there is no explicit when-to-use/when-not-to-use guidance, no mention of prerequisites such as the card already being in the wallet, and no statement about what to do for purchases that have not occurred yet.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.