Skip to main content
Glama

Aged debtors

crunch_get_aged_debtors
Read-only

View outstanding sales invoice balances grouped by days past due and customer to identify who owes money and for how long, with optional per-invoice detail.

Instructions

Who owes the business money and for how long: the outstanding balance of every issued sales invoice, grouped by days past its due date (current, 1-30, 31-60, 61-90 and over 90 days) and by customer, largest first. Drafts are left out. Reads every invoice, so it can take a few seconds on a large account. details=true also lists each invoice.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "crunch_get_aged_debtors"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailsNoAlso list each outstanding record with its age (default false: totals only)
as_of_dateNoAge the balances as of this date (YYYY-MM-DD; default today)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false and idempotentHint=false, so the safety profile is covered; the description adds real context beyond that: full-table scan cost ('reads every invoice, so it can take a few seconds on a large account'), the draft-exclusion rule, and the sort order. It does not note that omitting as_of_date makes results drift day to day, which is the practical meaning of idempotentHint=false.

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?

Three short sentences, front-loaded with the business question and the output shape, followed by the two behavioral caveats (drafts excluded, slow on large accounts) and the flag effect. No filler.

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 no output schema, the description carries the burden of explaining the return shape, and it does so reasonably well by naming the buckets and the customer grouping and sort order. It leaves per-row fields unstated, but for a read-only aggregate that gap is minor.

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 100%, so both parameters are already documented with defaults and format. The description only restates the details=true behavior ('also lists each invoice') and adds nothing about as_of_date semantics such as whether it affects the bucket boundaries. Baseline 3 is appropriate.

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 resource and verb-plus-scope: outstanding balances of issued sales invoices grouped into aging buckets (current, 1-30, 31-60, 61-90, 90+) and by customer. The opening clause 'who owes the business money and for how long' makes it distinguishable at a glance from the receivables-side sibling crunch_get_aged_creditors.

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?

The use case is strongly implied by the framing question, and it states that drafts are excluded, which is a useful selection rule. However, it never says when to prefer this over alternatives such as crunch_get_invoice_totals or crunch_get_invoice, and there are no explicit exclusions or prerequisites.

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

Deploy Server

Other Tools