Skip to main content
Glama

Settle group expenses

settle_group_expenses
Read-onlyIdempotent

Use this when a group (trip, vacation, roommates, couple, event) has several shared expenses paid by different people and wants to know who owes who and how to settle up. Each expense can be split equally, by exact amounts, by percentages, or by shares. Returns each person's balance (paid minus share, summing to exactly zero) and the fewest payments that settle every balance to the cent, plus a CSV of payments, balances, and expenses. One currency per call: mixed currencies are rejected and nothing is converted. Does not send payment requests, move money, or remember the group; for one restaurant bill use split_bill.

Input Schema

NameRequiredDescriptionDefault
titleNoOptional label, e.g. "Lisbon trip".
peopleNoEveryone in the group, e.g. ["Ana", "Ben", "Chloe", "Dev"]. Needed when "everyone" should include someone who never paid. Optional otherwise.
currencyNoISO 4217 code for every expense, e.g. USD, EUR, GBP. Defaults to USD. Mixed currencies are rejected; nothing is converted.
expensesYesEvery shared expense. Example: [{"description": "Airbnb", "amount": 360, "paid_by": "Ana"}, {"description": "Gas", "amount": 90, "paid_by": "Ben", "split_among": ["Ben", "Chloe"]}]. Record a repayment already made as an expense paid_by the person who paid it back, with split_among set to the person who received it.

Output Schema

NameRequiredDescriptionDefault
kindYes
hintsYes
titleYes
peopleYes
totalsYes
displayYes
minimalYes
currencyYes
expensesYes
warningsYes
downloadsYes
transfersYes
minor_unitsYes
expense_countYes
expenses_shownYes
transfer_countYes
nonzero_balancesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint and destructiveHint=false, but the description adds substantial beyond-annotation context: balances sum to exactly zero, the tool computes the fewest payments, mixed currencies are rejected with no conversion, and it does not send payment requests, move money, or persist the group. These are behavioral guarantees an agent can't get from the annotations alone.

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?

Front-loaded with when-to-use, then split modes, then return values, then boundaries and sibling routing. Dense but every sentence carries information; no filler.

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?

A read-only computation tool with an output schema and full param coverage. The description still adds the zero-sum guarantee, minimal-payments property, currency constraint, and non-persistence, which are the things an agent most needs to trust before calling.

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 coverage is 100%, so the schema already documents split modes, split_among, and split_values. The description reinforces the four split modes and the one-currency-per-call constraint, but adds little semantic detail beyond the schema. 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 verb+resource (settle group expenses) and immediately scopes it to multi-expense groups like trips, roommates, and events. It explicitly distinguishes itself from the sibling split_bill by telling the agent to use split_bill for a single restaurant bill.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear triggering condition ('several shared expenses paid by different people') and an explicit exclusion routing to the alternative ('for one restaurant bill use split_bill'). Mixed-currency rejection and the no-money-movement boundary are also spelled out, so the agent knows when this tool is and isn't appropriate.

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