Skip to main content
Glama

Get spending summary

mofi_spending_summary_get
Read-onlyIdempotent

Use this first for 'how much do I spend', monthly or weekly averages, and spending by category or merchant. Summarize debit spending over an explicit period of at most 366 days in one call: totals per month or ISO week (zero-spend periods included), the average over periods fully inside the range, and the top categories or merchants with the remainder. Totals use { amount, currency } with amount as an exact decimal string; Currencies remain separate; bank-converted ones count in the account's. Pending debits count by default and drop once posted. Internal transfers, card bill payments and investment moves are excluded by default and reported under excluded. Internal transfer is a simple heuristic: your category override is transfer, the provider category is 'Same person transfer', the operation code is an own-account transfer (incl. Pix to your own CPF), or a non-cancelled credit with the same currency and amount exists in another of your accounts within 3 days. A generic TRANSFER code alone is still spending. Card payments and investments match Mofi's classification: your override, else a bill-debit description, else the provider category rule, else known operation codes. Periods that have not ended yet are marked complete=false and left out of the average. meta.warnings flags connections that hold the same bank data. Breakdown keys follow mofi_spending_get group keys.

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>"
    },
    "name": "mofi_spending_summary_get"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes
whereYesInclusive period; optionally one account or one connection.
intervalNomonth
breakdownNocategory
breakdownLimitNo
includePendingNo
includeInvestmentsNo
includeCardPaymentsNo
includeInternalTransfersNo

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

The annotations already establish that the call is read-only, idempotent, and non-destructive, yet the description adds substantive behavior well beyond them: pending debits count by default and drop once posted, unfinished periods return complete=false and are excluded from the average, meta.warnings flags connections sharing the same bank data, and currencies are never summed across. It also spells out exactly which transactions are excluded by default and how internal transfers, card payments, and investments are classified.

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 description is front-loaded: it leads with the routing sentence and the one-call summary contract before descending into exclusion heuristics. Most sentences carry necessary classification rules a caller would otherwise get wrong, though the internal-transfer heuristic sentence packs four alternative conditions into one long clause and could be split for readability.

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?

With an output schema present, the description does not need to detail the return shape, and it still usefully flags result fields like complete and meta.warnings. It covers the tool's main complexity sources: currency separation, pending handling, and the three exclusion classes. The main remaining gap is the timezone parameter, and secondarily the absence of explicit breakdownLimit bounds, though those appear in the schema.

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 only 11%, so the description has to carry most of the parameter meaning, and it does so conceptually rather than by name: the 366-day cap on the period, month versus week intervals, the top-N-with-remainder behavior of the breakdown, and the default-on/off status of pending, transfers, card payments, and investments. However, it never maps these to specific parameter names such as includePending, breakdownLimit, or timezone, and the timezone parameter receives no explanation at all.

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 description states a specific verb and resource: it summarizes debit spending over an explicit period in one call, returning totals per month or ISO week, an average, and top categories or merchants. It also distinguishes itself from the sibling mofi_spending_get by noting that breakdown keys follow that tool's group keys, so an agent can tell the two apart without opening either schema.

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?

It opens with explicit routing guidance ('Use this first for "how much do I spend", monthly or weekly averages, and spending by category or merchant'), which tells the agent the question shapes that should select this tool. It does not state when to prefer a different tool instead, but it does point to mofi_spending_get for the underlying group-key semantics.

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.