Skip to main content
Glama

Calculate tip

calculate_tip
Read-onlyIdempotent

Calculate a suggested tip and total for a bill using Tipping Rules destination norms (percent or round-up). Returns amounts plus canonical destination and calculator URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
billYesBill amount in local currency units (positive number).
countryYesCountry slug or name for local tipping norms.
serviceNoService category. Prefer restaurant, bar, taxi, delivery, hotelStaff, or tourGuides.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / bill / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "string"
      -  }
      -]
    • addedInput schema / properties / bill / type
      Added value: +[
      +  "number",
      +  "string"
      +]
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "bill": {
      -        "description": "Bill amount in local currency units.",
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      "calculatorUrl": {
      -        "description": "Deep link to the on-site calculator for this country.",
      -        "format": "uri",
      -        "type": "string"
      -      },
      -      "canonicalUrl": {
      -        "description": "Canonical country page URL.",
      -        "format": "uri",
      -        "type": "string"
      -      },
      -      "country": {
      -        "description": "Display name of the destination.",
      -        "type": "string"
      -      },
      -      "currency": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "ISO currency code when known (e.g. EUR, USD)."
      -      },
      -      "lastReviewed": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "ISO date when guidance was last reviewed, when available."
      -      },
      -      "methodologyUrl": {
      -        "description": "How Tipping Rules reviews and sources guidance.",
      -        "format": "uri",
      -        "type": "string"
      -      },
      -      "mode": {
      -        "description": "Calculation mode applied for this service and destination.",
      -        "enum": [
      -          "percent",
      -          "round_up",
      -          "zero"
      -        ],
      -        "type": "string"
      -      },
      -      "ok": {
      -        "const": true,
      -        "description": "True when the tip was calculated.",
      -        "type": "boolean"
      -      },
      -      "recommendation": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Human-readable norm string for the selected service."
      -      },
      -      "service": {
      -        "description": "Service category label used for the calculation.",
      -        "type": "string"
      -      },
      -      "slug": {
      -        "description": "Country slug.",
      -        "type": "string"
      -      },
      -      "source": {
      -        "const": "Tipping Rules",
      -        "description": "Attribution for downstream citations.",
      -        "type": "string"
      -      },
      -      "tipAmount": {
      -        "description": "Suggested tip amount in local currency units.",
      -        "type": "number"
      -      },
      -      "tipPercent": {
      -        "anyOf": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Applied tip percent when mode is percent; null for round-up."
      -      },
      -      "total": {
      -        "description": "Bill plus suggested tip.",
      -        "type": "number"
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "country",
      -      "slug",
      -      "service",
      -      "bill",
      -      "currency",
      -      "mode",
      -      "tipPercent",
      -      "tipAmount",
      -      "total",
      -      "recommendation",
      -      "lastReviewed",
      -      "canonicalUrl",
      -      "calculatorUrl",
      -      "methodologyUrl",
      -      "source"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "code": {
      -        "description": "Machine-readable error code (e.g. NOT_FOUND, VALIDATION, TIMEOUT).",
      -        "type": "string"
      -      },
      -      "message": {
      -        "description": "Short, agent-safe error message.",
      -        "type": "string"
      -      },
      -      "ok": {
      -        "const": false,
      -        "description": "False when the tool could not complete successfully.",
      -        "type": "boolean"
      -      }
      -    },
      -    "required": [
      -      "ok",
      -      "code",
      -      "message"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "bill": {
      +        "description": "Bill amount in local currency units.",
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      },
      +      "calculatorUrl": {
      +        "description": "Deep link to the on-site calculator for this country.",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "canonicalUrl": {
      +        "description": "Canonical country page URL.",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "Display name of the destination.",
      +        "type": "string"
      +      },
      +      "currency": {
      +        "description": "ISO currency code when known (e.g. EUR, USD).",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "lastReviewed": {
      +        "description": "ISO date when guidance was last reviewed, when available.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "methodologyUrl": {
      +        "description": "How Tipping Rules reviews and sources guidance.",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "mode": {
      +        "description": "Calculation mode applied for this service and destination.",
      +        "enum": [
      +          "percent",
      +          "round_up",
      +          "zero"
      +        ],
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": true,
      +        "description": "True when the tip was calculated.",
      +        "type": "boolean"
      +      },
      +      "recommendation": {
      +        "description": "Human-readable norm string for the selected service.",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "service": {
      +        "description": "Service category label used for the calculation.",
      +        "type": "string"
      +      },
      +      "slug": {
      +        "description": "Country slug.",
      +        "type": "string"
      +      },
      +      "source": {
      +        "const": "Tipping Rules",
      +        "description": "Attribution for downstream citations.",
      +        "type": "string"
      +      },
      +      "tipAmount": {
      +        "description": "Suggested tip amount in local currency units.",
      +        "type": "number"
      +      },
      +      "tipPercent": {
      +        "description": "Applied tip percent when mode is percent; null for round-up.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "total": {
      +        "description": "Bill plus suggested tip.",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "country",
      +      "slug",
      +      "service",
      +      "bill",
      +      "currency",
      +      "mode",
      +      "tipPercent",
      +      "tipAmount",
      +      "total",
      +      "recommendation",
      +      "lastReviewed",
      +      "canonicalUrl",
      +      "calculatorUrl",
      +      "methodologyUrl",
      +      "source"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "code": {
      +        "description": "Machine-readable error code (e.g. NOT_FOUND, VALIDATION, TIMEOUT).",
      +        "type": "string"
      +      },
      +      "message": {
      +        "description": "Short, agent-safe error message.",
      +        "type": "string"
      +      },
      +      "ok": {
      +        "const": false,
      +        "description": "False when the tool could not complete successfully.",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "ok",
      +      "code",
      +      "message"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "bill": {
      +          "description": "Bill amount in local currency units.",
      +          "exclusiveMinimum": 0,
      +          "type": "number"
      +        },
      +        "calculatorUrl": {
      +          "description": "Deep link to the on-site calculator for this country.",
      +          "format": "uri",
      +          "type": "string"
      +        },
      +        "canonicalUrl": {
      +          "description": "Canonical country page URL.",
      +          "format": "uri",
      +          "type": "string"
      +        },
      +        "country": {
      +          "description": "Display name of the destination.",
      +          "type": "string"
      +        },
      +        "currency": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "ISO currency code when known (e.g. EUR, USD)."
      +        },
      +        "lastReviewed": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "ISO date when guidance was last reviewed, when available."
      +        },
      +        "methodologyUrl": {
      +          "description": "How Tipping Rules reviews and sources guidance.",
      +          "format": "uri",
      +          "type": "string"
      +        },
      +        "mode": {
      +          "description": "Calculation mode applied for this service and destination.",
      +          "enum": [
      +            "percent",
      +            "round_up",
      +            "zero"
      +          ],
      +          "type": "string"
      +        },
      +        "ok": {
      +          "const": true,
      +          "description": "True when the tip was calculated.",
      +          "type": "boolean"
      +        },
      +        "recommendation": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Human-readable norm string for the selected service."
      +        },
      +        "service": {
      +          "description": "Service category label used for the calculation.",
      +          "type": "string"
      +        },
      +        "slug": {
      +          "description": "Country slug.",
      +          "type": "string"
      +        },
      +        "source": {
      +          "const": "Tipping Rules",
      +          "description": "Attribution for downstream citations.",
      +          "type": "string"
      +        },
      +        "tipAmount": {
      +          "description": "Suggested tip amount in local currency units.",
      +          "type": "number"
      +        },
      +        "tipPercent": {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "description": "Applied tip percent when mode is percent; null for round-up."
      +        },
      +        "total": {
      +          "description": "Bill plus suggested tip.",
      +          "type": "number"
      +        }
      +      },
      +      "required": [
      +        "ok",
      +        "country",
      +        "slug",
      +        "service",
      +        "bill",
      +        "currency",
      +        "mode",
      +        "tipPercent",
      +        "tipAmount",
      +        "total",
      +        "recommendation",
      +        "lastReviewed",
      +        "canonicalUrl",
      +        "calculatorUrl",
      +        "methodologyUrl",
      +        "source"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "code": {
      +          "description": "Machine-readable error code (e.g. NOT_FOUND, VALIDATION, TIMEOUT).",
      +          "type": "string"
      +        },
      +        "message": {
      +          "description": "Short, agent-safe error message.",
      +          "type": "string"
      +        },
      +        "ok": {
      +          "const": false,
      +          "description": "False when the tool could not complete successfully.",
      +          "type": "boolean"
      +        }
      +      },
      +      "required": [
      +        "ok",
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    }
      +  ],
      +  "description": "Tip calculation result or a structured error.",
      +  "type": "object"
      +}
  3. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources