Skip to main content
Glama

Get expenses total

crunch_get_expenses_total
Read-only

Total expenses matching status, date range, supplier, type, payment method, or receipt filters, including gross, underpaid, and overpaid amounts, without listing them.

Instructions

Total the expenses matching the filters (gross amount, plus under- and over-paid amounts) without listing them. Handy for "how much did I spend on travel this year?".

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": {
      "status": "<status>"
    },
    "name": "crunch_get_expenses_total"
  }
}

Input Schema

NameRequiredDescriptionDefault
statusYesExpense status to total, as Crunch names it in the status field of expenses (see crunch_list_expenses)
end_dateNoExpenses dated on or before (YYYY-MM-DD)
start_dateNoExpenses dated on or after (YYYY-MM-DD)
supplier_idNoOnly this supplier's expenses
expense_typeNoOnly this expense type, for example TRAVEL_AND_SUBSISTENCE
has_attachmentNoOnly expenses with (true) or without (false) a receipt attached
payment_methodNoOnly expenses paid this way, for example EFT
payment_end_dateNoPaid on or before (YYYY-MM-DD)
payment_start_dateNoPaid on or after (YYYY-MM-DD)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds behavior the annotations do not: the total is composed of gross, under-paid, and over-paid amounts rather than a single figure, which matters for interpreting the result given there is no output schema. It does not mention currency handling or whether a zero-result set returns zero, leaving a small gap.

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?

Two sentences, zero filler: the aggregation behavior and the exclusion of listing come first, followed by a single illustrative question. Nothing could be removed without losing information.

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 a read-only aggregate with fully documented parameters and clear disclosure of the total's components, the definition gives an agent enough to call it correctly. Minor gaps remain around currency or rounding behavior, but the absence of an output schema is largely compensated by naming the summed components.

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% and all nine filters, including date and payment-date bounds, are documented in the schema itself. The description only refers generically to 'the filters' and adds no syntax or semantics beyond the schema, so the baseline 3 applies.

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 ('Total') and resource ('the expenses matching the filters') and immediately distinguishes itself from the list-style siblings with 'without listing them.' It also specifies what is summed (gross amount, plus under- and over-paid amounts), so an agent can tell it apart from crunch_list_expenses and crunch_get_expense without opening a 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?

The example question ('how much did I spend on travel this year?') makes the intended aggregation use case concrete, and 'without listing them' implicitly contrasts it with the listing sibling. It stops short of explicitly naming crunch_list_expenses or stating exclusions, so it is clear guidance rather than full routing rules.

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