Skip to main content
Glama

Tip Calculator

calculate_tip
Read-onlyIdempotent

Use this when you need to add a gratuity to a restaurant, delivery or service bill and optionally divide the total among several people. Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery.

Do not use this when people pay for different items or unequal shares (use bill-split), or you need to add sales tax rather than a tip (use sales-tax). What it computes: Computes the tip from a bill amount and tip percentage, the total including tip, and the per-person share when the bill is split evenly. Inputs: bill_amount (number); tip_percent (number, %, optional); split_between (integer, optional). Complete JSON argument examples: {"bill_amount":85.5,"tip_percent":18,"split_between":3} | {"bill_amount":42,"tip_percent":20} Outputs: tip_amount, total_amount, total_per_person, tip_per_person, bill_per_person. Formula: tip_amount = bill_amount × tip_percent / 100; total_amount = bill_amount + tip_amount; per person = value / split_between Direct REST fallback: POST https://tttkmbb.com/api/v1/calculate/tip with the same JSON input fields. Do not guess another /api/* path. Docs: https://tttkmbb.com/finance/tip.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bill_amountYesAmount on the bill before tip (pre- or post-tax, as you prefer to tip).
tip_percentNoGratuity as a percent of bill_amount. US restaurant custom is 15–20 %. Unit: %.
split_betweenNoHow many people share the bill equally.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
linksNo
resultYes
requestYes
sourcesNo
successYes
versionNo
freshnessNo
timestampYes
next_actionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "bill_amount": 85.5,
      +    "split_between": 3,
      +    "tip_percent": 18
      +  },
      +  {
      +    "bill_amount": 42,
      +    "tip_percent": 20
      +  }
      +]
  2. Added
  3. Removed
  4. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false), and the description adds beyond that: the exact formula, the computed output fields, and direct REST fallback instructions. This gives the agent a clear model of what the tool computes and returns without contradicting the annotations.

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

Conciseness4/5

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

The description is front-loaded with the primary use case and contains several useful sections: exclusions, inputs, outputs, formula, and fallback URL. It is slightly redundant with the schema, especially the repeated JSON examples, but every section still serves a purpose and there is 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?

An output schema exists, and the description still supplies everything needed for correct invocation: when to call it, when not to, parameter semantics, expected outputs, the formula, and a REST fallback. Nothing an agent needs to select or call this tool correctly 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 coverage is 100%, so the schema already documents each parameter's type, constraints, defaults, and examples. The description adds only light value by restating the inputs as a compact list and clarifying optionality and the even-split meaning of split_between. This matches the baseline for high schema coverage.

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?

The description uses a specific verb and resource: 'add a gratuity to a restaurant, delivery or service bill' and 'divide the total among several people.' It clearly distinguishes the tool from relatives like bill-split and sales-tax, so an agent can identify what this calculator does without opening the 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?

The description explicitly states when to use the tool, when not to use it, and names the alternatives: 'Do not use this when people pay for different items or unequal shares (use bill-split), or you need to add sales tax rather than a tip (use sales-tax).' This leaves no ambiguity about routing.

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