Skip to main content
Glama

Totals of invoices and bills, grouped (aging)

query_invoices
Read-onlyIdempotent

Adds up invoices you sent (owed_to_you) and bills you received (you_owe), grouped by up to two of: counterparty, aging (current, 1-30, 31-60, 61-90, 90+ days overdue), status, company, side, due_month, issue_month. Measures per currency: outstanding, total, paid, count, avg_days_overdue. By default only unpaid ones (open, overdue, partially paid, disputed); include_paid adds paid ones. Example: who owes the most, by aging: side owed_to_you, group_by ["counterparty","aging"]. search_invoices lists the invoices behind a group.

Input Schema

NameRequiredDescriptionDefault
sideNoboth
limitNo
orderNolargest (default): by outstanding; key: by group (default when grouping by aging or a month).
companyNoCompany name or id, "Personal", or "all". Omit for every company this connection can see.
group_byNo
measuresNo
counterpartyNo
include_paidNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, closed-world), and the description adds behavior beyond that: the default exclusion of paid invoices with the specific statuses included, the two-group cap, and the per-currency measure semantics. It omits limit/pagination behavior and ordering defaults, but the added filtering context is substantive.

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 grouping dimensions, measures, default filter, and a routing example. Every clause carries information, though the enum restatements make it feel packed and could be trimmed if the schema documented more.

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 an 8-parameter, no-output-schema aggregation tool, the description supplies the grouping model, measure vocabulary, and default scope an agent needs to form a correct call. Remaining gaps (limit/pagination, ordering default rationale) are minor rather than blocking.

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 description coverage is only 25%, so the description carries real weight: it defines the side values (owed_to_you = invoices you sent, you_owe = bills you received), enumerates the group_by dimensions with an aging breakdown, and lists the available measures. Undocumented remain limit, counterparty, and the ordering interaction, but it compensates well for the low coverage.

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?

Opens with a concrete verb and resource ('Adds up invoices you sent ... and bills you received ... grouped by'), and explicitly distinguishes itself from search_invoices ('search_invoices lists the invoices behind a group'). An agent can tell this is an aggregation tool versus a listing tool 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?

Gives a worked example ('who owes the most, by aging') and states the default filtering posture (only open/overdue/partially paid/disputed unless include_paid), which is real when-to-use guidance. It names the complementary sibling for drill-down, but does not state when a different aggregation tool (e.g. get_reports) would be preferable.

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.