Skip to main content
Glama

Settle up

settle_up
Read-onlyIdempotent

Split shared costs equally between housemates, compare with what each already paid, and compute balances plus the fewest payments that settle everyone. Use after people fronted money for the group. Computes only; moves no money. Do NOT use for usage-weighted bills (use split_utilities).

Input Schema

NameRequiredDescriptionDefault
costsYesShared costs, split equally between everyone in payments (names must be unique), e.g. [{"name":"Groceries","amount":140}]
paymentsYesEvery housemate sharing the costs and what they already paid (include people who paid 0), e.g. [{"name":"Asha","paid":150},{"name":"Mira","paid":0}]

Output Schema

NameRequiredDescriptionDefault
noteYesSummary of how many payments settle the group
peopleYesPer-housemate paid, owed and balance
transfersYesFewest payments that settle all balances (empty when settled)
total_costsYesSum of all shared costs

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changed
    • changedInput schema / properties / costs / description
      Previous value: -"Shared costs to split equally"New value: +"Shared costs, split equally between everyone in payments (names must be unique), e.g. [{\"name\":\"Groceries\",\"amount\":140}]"
    • addedInput schema / properties / costs / items / properties / amount / description
      Added value: +"Cost amount, positive number"
    • addedInput schema / properties / costs / items / properties / name / description
      Added value: +"Unique cost label, e.g. 'Weekly shop'"
    • addedInput schema / properties / costs / minItems
      Added value: +1
    • changedInput schema / properties / payments / description
      Previous value: -"What each housemate paid"New value: +"Every housemate sharing the costs and what they already paid (include people who paid 0), e.g. [{\"name\":\"Asha\",\"paid\":150},{\"name\":\"Mira\",\"paid\":0}]"
    • addedInput schema / properties / payments / items / properties / name / description
      Added value: +"Unique housemate name"
    • addedInput schema / properties / payments / items / properties / paid / description
      Added value: +"Amount this housemate already paid towards the costs, 0 or more"
    • addedInput schema / properties / payments / minItems
      Added value: +1
    • removedOutput schema / properties / balances
      Removed value: -{
      -  "description": "List of balances for each housemate",
      -  "items": {
      -    "properties": {
      -      "balance": {
      -        "description": "The balance owed or due by the housemate",
      -        "type": "number"
      -      },
      -      "name": {
      -        "description": "The name of the housemate",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "name",
      -      "balance"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / note
      Added value: +{
      +  "description": "Summary of how many payments settle the group",
      +  "type": "string"
      +}
    • addedOutput schema / properties / people
      Added value: +{
      +  "description": "Per-housemate paid, owed and balance",
      +  "items": {
      +    "properties": {
      +      "balance": {
      +        "description": "paid minus owed; positive = should receive money, negative = owes money",
      +        "type": "number"
      +      },
      +      "name": {
      +        "description": "Housemate name",
      +        "type": "string"
      +      },
      +      "owed": {
      +        "description": "Equal share of the total costs",
      +        "type": "number"
      +      },
      +      "paid": {
      +        "description": "Amount already paid",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "paid",
      +      "owed",
      +      "balance"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / total_costs
      Added value: +{
      +  "description": "Sum of all shared costs",
      +  "type": "number"
      +}
    • removedOutput schema / properties / transactions
      Removed value: -{
      -  "description": "List of transactions to settle the balances",
      -  "items": {
      -    "properties": {
      -      "amount": {
      -        "description": "The amount to be paid",
      -        "type": "number"
      -      },
      -      "from": {
      -        "description": "The name of the housemate paying",
      -        "type": "string"
      -      },
      -      "to": {
      -        "description": "The name of the housemate receiving the payment",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "from",
      -      "to",
      -      "amount"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / transfers
      Added value: +{
      +  "description": "Fewest payments that settle all balances (empty when settled)",
      +  "items": {
      +    "properties": {
      +      "amount": {
      +        "description": "Amount to transfer",
      +        "type": "number"
      +      },
      +      "from": {
      +        "description": "Housemate who pays",
      +        "type": "string"
      +      },
      +      "to": {
      +        "description": "Housemate who receives",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "from",
      +      "to",
      +      "amount"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "balances",
      -  "transactions"
      -]New value: +[
      +  "total_costs",
      +  "people",
      +  "transfers",
      +  "note"
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "balances": {
      +      "description": "List of balances for each housemate",
      +      "items": {
      +        "properties": {
      +          "balance": {
      +            "description": "The balance owed or due by the housemate",
      +            "type": "number"
      +          },
      +          "name": {
      +            "description": "The name of the housemate",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "balance"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "transactions": {
      +      "description": "List of transactions to settle the balances",
      +      "items": {
      +        "properties": {
      +          "amount": {
      +            "description": "The amount to be paid",
      +            "type": "number"
      +          },
      +          "from": {
      +            "description": "The name of the housemate paying",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "The name of the housemate receiving the payment",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to",
      +          "amount"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "balances",
      +    "transactions"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds meaningful context beyond them by stating 'Computes only; moves no money', which tells the agent no financial side effect occurs. It stops short of describing the output shape, but an output schema exists.

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?

Three tight sentences: what it does, when to use it, then the exclusion. The core computation is front-loaded and no sentence is 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?

For a two-parameter computation tool with full schema coverage and an output schema, the description supplies purpose, trigger, exclusion, and the no-side-effect guarantee. Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3, but the description adds the crucial relationship semantics: costs are split equally across everyone listed in payments, and payments are compared against those costs. That linkage between the two parameters is not inferable from either schema field alone.

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: splitting shared costs equally, comparing against what each person paid, and computing balances plus the minimum set of settling payments. It explicitly contrasts itself with split_utilities, so an agent can separate it from siblings without reading schemas.

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 trigger ('Use after people fronted money for the group') and an explicit exclusion with the correct alternative ('Do NOT use for usage-weighted bills (use split_utilities)'). Both when-to-use and when-not-to-use are covered.

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