Skip to main content
Glama

Get expenses

get_expenses
Read-only

A trip’s expenses, everyone’s balance, and who should pay whom to square up (the fewest payments): for “who owes whom?” or “what have we spent?”. Amounts are decimal strings in major units (“12.50”); balances and payments are in the trip’s currency. Planned expenses are activities’ costs, not paid yet. A surprise kept from the user shows as “Surprise”: don’t guess at it.

Input Schema

NameRequiredDescriptionDefault
tripIdYesThe trip’s id, from list_trips

Output Schema

NameRequiredDescriptionDefault
balancesYesEveryone’s, from what’s paid and paid back. With the trip’s Families setting, a guest’s is in theirs who looks after them
currencyYesThe trip’s currency, which balances are in; null until its first expense
expensesYesBy day, planned ones last
transfersYesThe fewest payments that square everyone

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already establish read-only and non-destructive behavior. The description adds substantial domain context beyond annotations: amount formatting as decimal strings in major units, currency context, that planned expenses are unpaid activity costs, and that hidden surprises should not be guessed at.

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 front-loaded with the returned data and primary use cases, followed by compact formatting and edge-case notes. Every sentence adds useful information without repetition.

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?

Given the output schema, annotations, and single fully documented parameter, the description supplies the remaining domain semantics an agent needs. It covers return content, amount format, planned expenses, and the surprise edge case.

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?

There is only one parameter, tripId, and schema coverage is 100%; the schema already documents it as coming from list_trips. The description does not add further parameter-specific meaning, so the baseline of 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?

The description precisely states the resource and outputs: a trip’s expenses, everyone’s balances, and the minimal set of settlement payments. It clearly supports “who owes whom?” and “what have we spent?” and is distinct from the sibling add_expense tool.

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 gives explicit use-case triggers (“who owes whom?” or “what have we spent?”), which clearly signal when to call it. It does not name exclusions or alternatives such as add_expense, so it falls short of the highest bar.

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.

Resources