Skip to main content
Glama

Get spending

mofi_spending_get
Read-onlyIdempotent

Aggregate debit transactions by category, merchant, month, weekday, account, or statement over an explicit period of at most 366 days. Totals use { amount, currency } with amount as an exact decimal string; Currencies remain separate; bank-converted ones count in the account's. Category groups use the institution's label unless you set an override. Pending debits count by default and drop once posted. Internal transfers (incl. own-CPF Pix) are left out and reported under excluded unless includeInternalTransfers; generic TRANSFER is spending unless exclude has 'transfer'. exclude matches Mofi's classification (your override, else the provider category rule, else known operation codes). meta.warnings flags connections that hold the same bank data. Group keys: category 'override:' (your override; drill down with mofi_transactions_get where.normalizedCode), 'value:' (where.category) or 'unknown'; merchant 'value:', 'description:' when the bank sent no merchant (where.search with a distinctive part), or 'unknown'. Pass page.nextCursor unchanged. For averages and top categories, prefer mofi_spending_summary_get.

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": {
      "mode": "<mode>",
      "where": "<where>",
      "groupBy": "<groupBy>"
    },
    "name": "mofi_spending_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
pageNo
whereYes
excludeNo
groupByYes
includePendingNo
includeInternalTransfersNo

Output Schema

NameRequiredDescriptionDefault
dataNo
metaNo
modeNo
pageNo
errorNoTyped error (code, message, retryable, details); set when isError is true.
excludedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare a safe, read-only, idempotent operation, and the description adds substantial behavior on top: currencies are kept separate with bank-converted amounts folded into the account's, pending debits count until posted, internal transfers including own-CPF Pix are excluded and reported under excluded, and meta.warnings flags duplicate bank connections. It also documents the classification precedence (override, then provider rule, then known operation codes) that governs exclude matching.

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?

Purpose and period limit are front-loaded, and given 7 parameters at 0% schema coverage the length is justified rather than padded. However, the heavy semicolon-chained prose and parenthetical asides make it harder to scan than a short structured breakdown of the grouping-key and exclusion rules would be.

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

Completeness5/5

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

An output schema exists, so return shape need not be re-explained, yet the description still covers the parts an agent must reason about (currency separation, excluded bucket, meta.warnings). Combined with the grouping-key taxonomy and cursor handling, an agent can call this correctly and interpret the result without reading anything else.

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?

With zero schema description coverage, the description carries the full burden and largely does so: it decodes every groupBy key format ('override:<code>', 'value:<provider label>', 'unknown', 'value:<merchant>', 'description:<normalized description>'), explains exclude's matching against Mofi's classification, and states that page.nextCursor must be passed unchanged. The `mode` const and the timezone field are never mentioned, which is the only real gap.

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 first sentence gives a specific verb (aggregate) with the exact resource (debit transactions) and enumerates the six grouping dimensions plus the 366-day period bound, so the agent knows precisely what the tool produces. It also distinguishes itself from mofi_spending_summary_get by routing averages and top-category queries elsewhere.

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?

Explicit routing exists: 'For averages and top categories, prefer mofi_spending_summary_get', and drill-down to individual rows is routed to mofi_transactions_get with the where.normalizedCode hint. It also explains how to opt internal transfers in or treat TRANSFER as spending. What it lacks is any statement of when this tool should not be used beyond those two named cases.

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.