Skip to main content
Glama

Split costs

split_costs
Read-onlyIdempotent

Split one total court or venue cost across players, equally or by relative weights, and show each player's share plus the fewest payments to settle up. Use for a single booking or event. For recurring sessions with changing attendance use split_series.

Input Schema

NameRequiredDescriptionDefault
sharesNoOptional positive relative weights, one per participant in the same order, e.g. [2,1,1]; omit for an equal split
currencyNoCurrency code used only for display, e.g. USD, EUR, GBP (default USD)
total_costYesTotal court/venue cost in currency units, e.g. 96 for $96.00
participantsYesAt least 2 players with unique names; include 'paid' for anyone who already paid, e.g. [{"name":"Asha","paid":96},{"name":"Dev"}]

Output Schema

NameRequiredDescriptionDefault
noteYesPlain-language summary of the split
splitYesWhether the split was equal or by relative weights
currencyYesCurrency code used for display
per_headYesEqual share per player, or null for a weighted split
settle_upYesFewest payments that settle everyone (empty if nobody paid yet or all square)
total_costYesTotal cost that was split, rounded to cents
participantsYesPer-player paid, owed share and balance

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / properties / currency / description
      Previous value: -"Currency code for display, default USD"New value: +"Currency code used only for display, e.g. USD, EUR, GBP (default USD)"
    • changedInput schema / properties / participants / description
      Previous value: -"Players in the split"New value: +"At least 2 players with unique names; include 'paid' for anyone who already paid, e.g. [{\"name\":\"Asha\",\"paid\":96},{\"name\":\"Dev\"}]"
    • addedInput schema / properties / participants / items / properties / name / description
      Added value: +"Player name, unique within the list, e.g. 'Asha'"
    • addedInput schema / properties / participants / items / properties / paid / description
      Added value: +"Amount this player already paid toward the total, in currency units (default 0)"
    • addedInput schema / properties / participants / items / properties / paid / minimum
      Added value: +0
    • addedInput schema / properties / participants / minItems
      Added value: +2
    • changedInput schema / properties / shares / description
      Previous value: -"Optional relative weights, one per participant"New value: +"Optional positive relative weights, one per participant in the same order, e.g. [2,1,1]; omit for an equal split"
    • addedInput schema / properties / shares / items / exclusiveMinimum
      Added value: +0
    • changedInput schema / properties / total_cost / description
      Previous value: -"Total court/venue cost"New value: +"Total court/venue cost in currency units, e.g. 96 for $96.00"
    • addedInput schema / properties / total_cost / exclusiveMinimum
      Added value: +0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "currency": {
      +      "description": "Currency code used for display",
      +      "type": "string"
      +    },
      +    "note": {
      +      "description": "Plain-language summary of the split",
      +      "type": "string"
      +    },
      +    "participants": {
      +      "description": "Per-player paid, owed share and balance",
      +      "items": {
      +        "properties": {
      +          "balance": {
      +            "description": "paid minus owed; positive = gets money back, negative = owes money",
      +            "type": "number"
      +          },
      +          "name": {
      +            "description": "Player name",
      +            "type": "string"
      +          },
      +          "owed": {
      +            "description": "This player's fair share of the cost",
      +            "type": "number"
      +          },
      +          "paid": {
      +            "description": "Amount this player paid",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "paid",
      +          "owed",
      +          "balance"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "per_head": {
      +      "description": "Equal share per player, or null for a weighted split",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "settle_up": {
      +      "description": "Fewest payments that settle everyone (empty if nobody paid yet or all square)",
      +      "items": {
      +        "properties": {
      +          "amount": {
      +            "description": "Amount to transfer, rounded to cents",
      +            "type": "number"
      +          },
      +          "from": {
      +            "description": "Player who pays",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "Player who receives",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to",
      +          "amount"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "split": {
      +      "description": "Whether the split was equal or by relative weights",
      +      "enum": [
      +        "equal",
      +        "weighted"
      +      ],
      +      "type": "string"
      +    },
      +    "total_cost": {
      +      "description": "Total cost that was split, rounded to cents",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "currency",
      +    "total_cost",
      +    "split",
      +    "per_head",
      +    "participants",
      +    "settle_up",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "currency": {
      -      "description": "The currency code used for display.",
      -      "type": "string"
      -    },
      -    "individual_costs": {
      -      "description": "The cost owed by each participant.",
      -      "items": {
      -        "properties": {
      -          "amount": {
      -            "description": "The amount each participant owes.",
      -            "type": "number"
      -          },
      -          "name": {
      -            "description": "The name of the participant.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "name",
      -          "amount"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "settlements": {
      -      "description": "The list of settle-up payments to balance the costs.",
      -      "items": {
      -        "properties": {
      -          "amount": {
      -            "description": "The amount to be paid.",
      -            "type": "number"
      -          },
      -          "payee": {
      -            "description": "The name of the person receiving the payment.",
      -            "type": "string"
      -          },
      -          "payer": {
      -            "description": "The name of the person making the payment.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "payer",
      -          "payee",
      -          "amount"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "total_cost": {
      -      "description": "The total cost that was split.",
      -      "type": "number"
      -    }
      -  },
      -  "required": [
      -    "total_cost",
      -    "currency",
      -    "settlements",
      -    "individual_costs"
      -  ],
      -  "type": "object"
      -}New value: +null
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "currency": {
      +      "description": "The currency code used for display.",
      +      "type": "string"
      +    },
      +    "individual_costs": {
      +      "description": "The cost owed by each participant.",
      +      "items": {
      +        "properties": {
      +          "amount": {
      +            "description": "The amount each participant owes.",
      +            "type": "number"
      +          },
      +          "name": {
      +            "description": "The name of the participant.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "name",
      +          "amount"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "settlements": {
      +      "description": "The list of settle-up payments to balance the costs.",
      +      "items": {
      +        "properties": {
      +          "amount": {
      +            "description": "The amount to be paid.",
      +            "type": "number"
      +          },
      +          "payee": {
      +            "description": "The name of the person receiving the payment.",
      +            "type": "string"
      +          },
      +          "payer": {
      +            "description": "The name of the person making the payment.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "payer",
      +          "payee",
      +          "amount"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "total_cost": {
      +      "description": "The total cost that was split.",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "total_cost",
      +    "currency",
      +    "settlements",
      +    "individual_costs"
      +  ],
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.5/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 safety is covered. The description adds behavioral value beyond that by disclosing what the computation produces — per-player shares and a minimized set of settlement payments — which is not implied by the annotations. It stops short of any detail on ordering, rounding, or error behavior when weights do not match participants.

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: the action and its output first, then scope, then the alternative. Every sentence earns its place and the routing information is front-loaded.

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 pure computation tool with a complete input schema and an output schema, the description supplies everything an agent still needs: what it computes, what it returns conceptually, and when to pick it over split_series. Nothing required for correct invocation is missing.

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 schema already documents total_cost, participants, paid, shares, and currency with examples. The description only echoes the equal-vs-weights distinction, adding no syntax, ordering, or default detail beyond the schema. Baseline 3 is correct when the schema carries the parameter burden.

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 (split) and resource (one total court/venue cost) plus the two modes (equally or by relative weights) and the output (each share plus fewest settling payments). It also names the sibling split_series as the thing it is not, so an agent can distinguish it without opening a schema.

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?

Explicit scope statement — 'Use for a single booking or event' — paired with an explicit exclusion and alternative: 'For recurring sessions with changing attendance use split_series.' Both the when and the when-not are stated, leaving nothing to 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