Skip to main content
Glama

calculate_tip

Read-onlyIdempotent

Work out a tip and split a bill between people, in whole cents. round "none" rounds the tip to the cent; "up-total" rounds the total up to the next whole unit; "up-each" rounds each person's share up to the next whole unit and the total becomes shares times people. Returns tip, total and per_person as decimal strings. Free. Make receipts only for lawful purposes, such as replacing a lost receipt, bookkeeping, testing or design mockups. Using a receipt to deceive anyone, including for refunds, expense claims or proof of purchase, is prohibited.

Input Schema

NameRequiredDescriptionDefault
billYesThe bill before the tip, as a decimal string like 87.40
roundYesnone: to the cent. up-total: round the total up. up-each: round each share up
peopleYesHow many people share the bill
percentYesTip in percent, like "18"

Output Schema

NameRequiredDescriptionDefault
tipYes
totalYes
per_personYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds real behavioral detail beyond that: the exact return fields (tip, total, per_person as decimal strings), the arithmetic consequence of 'up-each' (total = shares × people), and that there is no cost. Only the receipt policy paragraph fails to contribute.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The first two sentences are dense and front-loaded with the right information. The final paragraph about lawful receipt use is irrelevant to a tip calculator and reads as copy-paste from make_receipt, violating 'every sentence should earn its place.'

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema and full annotation coverage, the description need only explain computation semantics, which it does well. But the receipt/deception paragraph introduces a false association with receipt generation that could mislead an agent about what this tool produces.

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 is 3, but the description earns above baseline by explaining the rounding modes in a way the schema does not: 'up-total' rounds the total up, 'up-each' rounds each share up *and* the total becomes shares times people, plus the whole-cents invariant that governs all modes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: 'Work out a tip and split a bill between people, in whole cents.' That is unambiguous and distinguishable from make_receipt or calculate_sales_tax. However, it never names or contrasts with those siblings, and the trailing receipt-policy paragraph muddies what the tool actually produces.

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

Usage Guidelines2/5

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

No guidance on when to use this versus calculate_sales_tax (also a computation tool) or make_receipt. The only usage framing is an off-topic prohibition about receipts, which does not tell an agent when to select this tool.

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