Skip to main content
Glama

Spending report

spending_report
Read-only

Aggregate the caller's spending over a date range, computed SERVER-side in SQL (never make the agent sum hundreds of rows). Required: 'from' and 'to' (YYYY-MM-DD) and 'group_by' (category/merchant/day/week/month). Optional 'category' / 'merchant' filters narrow the set. Returns {groups:[{key,total,receipt_count}], grand_total, currency}. Phase-1 single-currency: a range spanning multiple currencies is rejected with a clear validation error.

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": {
      "from": "<from>",
      "to": "<to>",
      "group_by": "<group_by>"
    },
    "name": "spending_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes
fromYes
categoryNo
group_byYes
merchantNo

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 establish read-only, non-destructive, closed-world behavior, and the description adds materially: computation happens server-side in SQL, the exact response shape is given, and the Phase-1 single-currency limitation with its rejection behavior is disclosed. Those are the non-obvious traits an agent would otherwise have to discover by failing.

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?

Dense but front-loaded: purpose first, then required inputs, then optional filters, then return shape and the currency caveat. Every clause carries information, though the mixed sentence-per-topic packing makes it slightly harder to scan than a bulleted breakdown.

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?

With no output schema, the description supplies the return structure ({groups, grand_total, currency}) and flags the multi-currency rejection edge case, which is the main failure mode. For a 5-parameter read tool this is sufficient to call correctly on the first attempt.

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 coverage is 0%, so the description carries the full burden and largely does: it fixes the date format (YYYY-MM-DD), lists the group_by values, and explains that category/merchant narrow the result set. Minor gap: it does not say whether category/merchant matching is exact or partial.

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 ('Aggregate the caller's spending') plus the scope ('over a date range') and the computation model ('computed SERVER-side in SQL'). The aggregation framing makes it clearly distinct from row-listing or subscription-oriented siblings without needing to name them.

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 a clear usage rationale — use this rather than making the agent fetch and sum hundreds of rows — and separates required from optional parameters. It stops short of naming any alternative tool or stating when-not-to-use (e.g. when per-transaction detail is needed), so it is clear context without explicit routing.

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