Skip to main content
Glama
LamPyrid
by RadCod3

Get Expense Insight

get_expense_insight
Read-onlyIdempotent

Analyze expenses over a date range to see total spending or break it down by vendor, source account, or budget, with optional inclusion of unbudgeted expenses.

Instructions

Analyze expenses for a time period with optional grouping.

Get total expenses or break them down by expense account (vendor/payee), asset account (source), or budget. When grouping by budget, optionally includes unbudgeted expenses as a separate entry.

Use cases:

  • See total spending for a month

  • Identify top expense categories/vendors

  • Track which accounts have the most outflow

  • Analyze budget utilization vs unbudgeted spending

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": {
      "req": "<req>"
    },
    "name": "get_expense_insight"
  }
}

Input Schema

NameRequiredDescriptionDefault
reqYesRequest for expense insight analysis.

Output Schema

NameRequiredDescriptionDefault
entriesYesList of expense entries, grouped as requested
end_dateYesEnd of the analysis period
group_byNoThe grouping method used, if any
start_dateYesStart of the analysis period
currency_codeYesPrimary currency code for the totals
total_expensesYesTotal expenses for the period (as positive number)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and closed-world behavior, so the safety profile is covered. The description adds useful behavior beyond that: grouping by budget can include unbudgeted expenses as a separate entry, and omitting group_by returns only a total.

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?

The description is front-loaded with the core operation, then structured into grouping behavior and concrete use cases. It is appropriately sized for the tool, with only slight redundancy between the grouping explanation and the use-case bullets.

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?

Given the nested request schema, high schema description coverage, existing output schema, and strong annotations, the description is complete enough to support correct invocation. It covers the main behavioral nuance around optional grouping and unbudgeted expenses without needing to explain return values.

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 the input schema already documents all nested parameters in detail. The description restates the grouping modes and unbudgeted behavior, adding some interpretive context but largely repeating what the schema provides.

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?

The description states a specific verb and resource: analyze expenses over a time period with optional grouping. It is clearly distinguishable from income and transfer insight tools by the expense resource, and it names the grouping modes the tool supports.

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?

It provides clear use cases such as seeing total monthly spending, identifying top categories/vendors, tracking outflows, and analyzing budget utilization. It does not explicitly compare against overlapping siblings like get_financial_summary or get_budget_spending, so there is no stated alternative or exclusion.

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