Skip to main content
Glama

Add a transaction

add_transaction

Records one income or expense in an account. Confirmed by default (it already happened, date today or earlier); with forecast=true it is a planned future transaction (today or later). The amount is positive; the sign comes from type. Account and category ids are the ones returned by get_accounts_and_categories. Transfers between accounts are not supported. It can be undone from the app (Ctrl+Z).

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": {
      "account_id": "<account_id>",
      "type": "<type>",
      "amount": "<amount>",
      "concept": "<concept>"
    },
    "name": "add_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
bookNoAccount book id (from list_books). Optional if the user has only one.
dateNoYYYY-MM-DD (default: today).
typeYes
scopeNofreelance = self-employed activity (needs the module). Default personal.
amountYesPositive amount in the account currency, up to 2 decimals.
conceptYes
forecastNotrue = planned, not yet happened (default false).
account_idYes
category_idNo
idempotency_keyNoOptional: the same key within 24 h returns the first transaction instead of creating a duplicate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the description does not need to re-establish that this is a write. It does add genuinely new behavior: default-vs-forecast semantics, the positive-amount/sign-from-type convention, the 24h idempotency semantics being relegated to the schema, and the fact that the entry can be undone from the app with Ctrl+Z — a useful reversibility signal not present in annotations. It says nothing about what is returned (e.g. the new transaction id) or whether forecast entries appear immediately in summaries, which leaves the disclosure only moderately helpful beyond structured data.

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?

Five short sentences, each carrying a distinct decision rule, with the confirmed/forecast distinction front-loaded rather than buried. Nothing is filler and no sentence merely restates the tool name or annotations.

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 10-parameter mutation with no output schema and no annotations covering return data, the description covers the mutating semantics, mode selection, referential dependencies, and reversibility well. The notable remaining gap is that it says nothing about the result of the call, which matters for a tool whose caller likely needs the created transaction's identifier.

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 60%, so several parameters (account_id, category_id, type, concept) carry no description in the schema; the description compensates for three of them by explaining that ids come from get_accounts_and_categories and that type determines the sign while amount stays positive. The one remaining undocumented parameter, concept, is never explained beyond its length bounds.

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 ("Records one income or expense in an account") and immediately scopes it into two modes, confirmed vs. forecast, that an agent can act on. It also rules out a whole class of related operations ("Transfers between accounts are not supported"), which separates it from anything else that might touch account balances.

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 concrete selection logic: default is a transaction that already happened (date today or earlier), forecast=true is a planned one (today or later), plus a clear exclusion for transfers and a pointer to get_accounts_and_categories for obtaining valid ids. It stops short of naming the alternative tools for planned entries (e.g. confirm_forecast / get_forecast) that an agent would need when the user later wants to act on a forecast.

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