Skip to main content
Glama
Swipe Smart MCP

Swipe Smart MCP

by afzalmukhtar

add_transaction

Logs a new expense transaction to the database, capturing amount, merchant, category, and card used for expense tracking.

Instructions

Logs a new expense (transaction) to the database.

**IMPORTANT: Call `get_expense_logging_rules` first to learn the rules for parsing user input.**

Args:
    amount: The value of the transaction (must be positive).
    merchant: The name of the place/service (e.g., "Swiggy", "Amazon").
    category: The expense category. Must be a valid category from get_expense_logging_rules.
    card_name: The name of the credit card used.
    platform: How the payment was made (e.g., "Direct", "SmartBuy").
    date: Optional date in 'YYYY-MM-DD' format. Defaults to today.
    is_online: Explicit flag if known (True=Online, False=Offline). If None, system infers.

Returns:
    dict: Confirmation details including Transaction ID and status.

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": {
      "amount": "<amount>",
      "merchant": "<merchant>",
      "category": "<category>",
      "card_name": "<card_name>"
    },
    "name": "add_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNo
amountYes
categoryYes
merchantYes
platformNoDirect
card_nameYes
is_onlineNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description still discloses real behavior: the date defaults to today, is_online of None triggers system inference, and the return value is a dict with Transaction ID and status. What it omits is failure behavior (what happens on an invalid category or negative amount) and any permission or side-effect notes, which keeps it short of a 5.

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?

The prerequisite warning is front-loaded where an agent will see it, and the Args block is scannable. A little space is spent restating parameter names, but each line adds a constraint or example rather than echoing the schema verbatim.

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 a 7-parameter, 4-required mutation tool with no annotations and no output schema, the description covers the prerequisite, all parameter constraints, defaults, and the return shape. The main remaining gap is error behavior for invalid categories or amounts, which an agent calling this would benefit from knowing.

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?

Schema description coverage is 0%, so the description has to carry all parameter meaning, and it does: amount must be positive, merchant and platform get representative examples, category is constrained to values from get_expense_logging_rules, date format and default are given, and is_online is explained as a tri-state with inference when None.

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?

The opening sentence states a specific verb and resource: "Logs a new expense (transaction) to the database." The word "new" separates it from delete_transaction and get_transactions, so an agent can place it without opening the 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?

It names a hard prerequisite explicitly: "IMPORTANT: Call get_expense_logging_rules first to learn the rules for parsing user input," and repeats the dependency on the category parameter by requiring a valid category from that same tool. Nothing about when to use it is left to inference.

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