Skip to main content
Glama

Add an expense

add_expense

Records a shared expense split equally: description, amount, currency, who paid (defaults to the participant) and who shares it (defaults to everyone). It records the cost only and moves no money. Use when the user reports something they or someone in the group paid for.

Input Schema

NameRequiredDescriptionDefault
planYesSaved plan link (e.g. https://lesgooo.fun/ab12/when) or its 4-character plan ID. Links without a plan ID (e.g. https://lesgooo.fun/when) are unsaved local drafts and are not accepted.
amountYesTotal, max 2 decimals (e.g. 42.5). Send a plain number.
currencyNoISO code, e.g. CZK or EUR. Sets the plan's currency if it has no expenses yet; otherwise must match it (see get_plan currency).
descriptionYesWhat it was for, e.g. "Groceries" (max 120 chars).
split_amongNoWho shares the cost (participant_id values or exact names). Defaults to everyone.
participant_idYesFrom create_plan or join_plan.
allow_duplicateNoOnly if the user confirms a second, identical expense within 10 minutes (otherwise it is treated as a retry).
participant_tokenYesFrom create_plan or join_plan.
paid_by_participant_idNoWho paid (participant_id from get_plan, or their exact name). Defaults to you.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / plan / description
      Previous value: -"Saved plan link (e.g. https://lesgooo.fun/ab12/when) or its 4-character id. Bare module links such as https://lesgooo.fun/when are local drafts: ask for a saved link, never substitute a previous plan ID."New value: +"Saved plan link (e.g. https://lesgooo.fun/ab12/when) or its 4-character plan ID. Links without a plan ID (e.g. https://lesgooo.fun/when) are unsaved local drafts and are not accepted."
  2. Changed1 schema field changed
    • changedInput schema / properties / plan / description
      Previous value: -"Plan link (e.g. https://lesgooo.fun/ab12/when) or its 4-character id."New value: +"Saved plan link (e.g. https://lesgooo.fun/ab12/when) or its 4-character id. Bare module links such as https://lesgooo.fun/when are local drafts: ask for a saved link, never substitute a previous plan ID."
  3. Changed4 schema fields changed
    • addedInput schema / properties / allow_duplicate
      Added value: +{
      +  "description": "Only if the user confirms a second, identical expense within 10 minutes (otherwise it is treated as a retry).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / amount / description
      Previous value: -"Total, max 2 decimals (e.g. 42.5)."New value: +"Total, max 2 decimals (e.g. 42.5). Send a plain number."
    • changedInput schema / properties / paid_by_participant_id / description
      Previous value: -"Who paid (participant_id from get_plan). Defaults to you."New value: +"Who paid (participant_id from get_plan, or their exact name). Defaults to you."
    • changedInput schema / properties / split_among / description
      Previous value: -"participant_id values sharing the cost. Defaults to everyone."New value: +"Who shares the cost (participant_id values or exact names). Defaults to everyone."
  4. Changed2 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Total in the plan's currency, max 2 decimals (e.g. 42.5)."New value: +"Total, max 2 decimals (e.g. 42.5)."
    • addedInput schema / properties / currency
      Added value: +{
      +  "description": "ISO code, e.g. CZK or EUR. Sets the plan's currency if it has no expenses yet; otherwise must match it (see get_plan currency).",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover safety (readOnly=false, destructive=false, idempotent=false), so the description earns credit for what it adds: the non-monetary nature of the operation and the equal-split semantics with defaults for payer and sharers. It does not address retry/duplicate handling, which is a notable omission for a non-idempotent mutation.

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 with no filler: the first defines mechanics and defaults, the second states the use condition. Front-loaded and every clause carries 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?

Annotations cover safety and the rich schema covers all parameters, so the description only needs the conceptual model, which it supplies (equal split, no money movement, defaults). The one gap is what happens on a repeat call within 10 minutes, which the description leaves entirely to the schema.

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 all nine parameters are already explained, including defaults, currency adoption rules, and allow_duplicate. The description's only addition is the equal-split rule, which is meaningful but small; 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 and resource (records a shared expense) and immediately qualifies the split model ('split equally') plus the key fields involved. It also draws a hard boundary against the sibling record_payment by declaring 'It records the cost only and moves no money.'

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?

Gives a concrete trigger: 'Use when the user reports something they or someone in the group paid for.' Combined with 'moves no money,' this implies when-not-to-use (settling up), but it never names record_payment as the alternative, so routing requires inference.

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