Skip to main content
Glama
ninetails-io

gnucash-mcp

spending_by_category

Read-only

Get a spending breakdown by expense category for any date range, with optional monthly, quarterly, or yearly grouping. Choose compact text or structured JSON output for reporting or analysis.

Instructions

Get spending breakdown by expense category for a period.

Returns a compact aligned text table by default. Use verbose=true for the structured dict (programmatic consumers, plotting).

Args: start_date: Start of period (YYYY-MM-DD), inclusive. No calendar snapping — for calendar-month figures pass full month boundaries (e.g. 2026-05-01 to 2026-07-31). end_date: End of period (YYYY-MM-DD), inclusive. depth: Hierarchy depth for grouping (1 = top-level categories, 2 = subcategories) verbose: If false (default), compact text output — optimized for reading and token efficiency. If true, structured JSON, for when you need machine-readable fields rather than a report. group_by: Optional "month", "quarter", or "year" — split the range into sub-period columns and return a multi-period TSV table (category rows, one column per period plus Total and Avg). Overrides verbose.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNo
verboseNo
end_dateYes
group_byNo
start_dateYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.2

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses detailed behavior: default compact aligned text output, verbose structured dict output, inclusive date handling, no calendar snapping with a concrete example, and group_by overriding verbose. This is substantive behavioral context not visible in readOnlyHint or openWorldHint.

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?

The description is well-structured as an Args list, front-loads the tool's purpose, and every sentence carries a needed detail: output format, parameter semantics, or override behavior. There is no filler or redundancy.

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 five parameters and a 0%-coverage schema, the description covers all of them, explains output formats, date semantics, and override interactions. Given an output schema exists, return-value details are sufficiently handled. The definition is complete enough for an agent to invoke the tool correctly.

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%, but the description fully compensates by documenting every parameter: date format and inclusivity, depth hierarchy levels, verbose behavior with defaults, and group_by allowed values ('month', 'quarter', 'year') plus its effect. It adds meaningful semantics beyond the bare JSON schema.

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: 'Get spending breakdown by expense category for a period.' The phrase 'by expense category' and the tool name clearly distinguish this from sibling reporting tools like vendor_spending_report and income_by_source.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit guidance on output modes: use verbose=true for programmatic consumers/plotting, and notes that group_by overrides verbose. However, it does not explicitly say when to choose spending_by_category over alternative reporting tools such as vendor_spending_report or income_by_source; that choice is only implied by the name and description.

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