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
service_versionYesDeployed Calcgrid implementation version used for the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / service_version
      Added value: +{
      +  "description": "Deployed Calcgrid implementation version used for the result.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "success",
      -  "request",
      -  "result",
      -  "timestamp"
      -]New value: +[
      +  "success",
      +  "service_version",
      +  "request",
      +  "result",
      +  "timestamp"
      +]
  2. 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
      +  }
      +]
  3. Added
  4. Removed
  5. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the safety profile is clear. The description adds behavioral context beyond that: it explicitly says the tool computes a tip and total, provides the formula, and warns to return the tool's calculation rather than deriving it manually. It also discloses a direct REST fallback path, which is extra transparency not present in annotations. No contradictions.

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 thorough but well-structured, front-loading usage guidance before inputs and outputs. Every section earns its place: usage, exclusions, computation summary, input list, examples, output list, formula, and fallback. It is slightly long but not padded; the structure makes it scannable.

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?

Given the tool's complexity (three parameters, one required, with a formula and output fields), the description is fully complete. It includes input names, types, optionality, default behaviors, complete JSON examples, output fields, the formula, and a direct REST fallback with explicit instruction not to guess other paths. There is an output schema signal, but the description independently covers return values, so no missing information for correct invocation.

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 schema already documents all three parameters with descriptions, units, ranges, and examples. The description adds value by stating the formula (tip_amount = bill_amount × tip_percent / 100) and explicitly mapping output fields, which clarifies how the parameters are used and what the results mean. This goes beyond a simple restatement of schema properties.

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 opens with a clear verb-and-resource statement: 'add a gratuity to a restaurant, delivery or service bill and optionally divide the total among several people.' It also names two distinct sibling tools (bill-split, sales-tax) and clarifies what it is not, so an agent can immediately distinguish it from nearby calculators like calculate_percentage or calculate_loan_payment.

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?

Explicitly states when to use ('Use this when...'), when not to use ('Do not use this when people pay for different items or unequal shares...'), and names the exact alternatives (bill-split, sales-tax). It also instructs to 'Call this tool directly and return its calculation instead of answering the formula from memory or stopping at discovery,' leaving no ambiguity about invocation.

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