Skip to main content
Glama

Agent Data Tools: Utilities

Tip calculator: tip, total and split per person

calc_tip
Read-only

Tip and total for a bill at a tip percentage, split between any number of people, optionally rounding each share up to the next whole amount. Use for receipts, expense apps and group payments. Example: bill=84.5. Price $0.01/call via x402 USDC or a card key (/credits), first 10 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "bill": "<bill>"
    },
    "name": "calc_tip"
  }
}

Input Schema

NameRequiredDescriptionDefault
billYesBill amount before tip
peopleNoPeople sharing, 1-100 (default 1)
percentNoTip percent, 0-100 (default 15)
roundUpNotrue to round each share up to a whole amount

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / people / maximum
      Previous value: -9007199254740991New value: +100
    • changedInput schema / properties / people / minimum
      Previous value: --9007199254740991New value: +1
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Beyond the readOnlyHint and destructiveHint=false annotations, the description adds meaningful behavioral context: pricing per call, a free allowance, failed calls being free, and the fact that repeats are charged. That last point usefully explains the idempotentHint=false annotation. It does not describe the exact shape of the returned tip/total/share values.

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 purpose is front-loaded effectively, but the text is cluttered with billing/payment-channel detail and ends with an incomplete fragment ('Example: bill=84.5.') that never states the expected result. Several clauses about x402 USDC and card keys do not help an agent invoke the tool correctly.

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

Completeness4/5

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

For a simple four-parameter calculator with fully described schema and annotations, the definition covers purpose, usage context, cost, and side-effect behavior adequately. The main gap is that return values (tip amount, total, per-person share) are only implied rather than stated, and there is no output schema to compensate.

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 meaning of bill, people, percent, and roundUp is already fully documented in the schema. The description reiterates the concepts (percentage, splitting, optional rounding) but adds no syntax, edge-case, or default information beyond the schema, so the baseline 3 applies.

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 states a specific computation: tip and total for a bill at a given percentage, split among people, with optional rounding. The resource and operation are unambiguous and clearly distinct from sibling calculators such as calc_age or calc_loan.

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

Usage Guidelines4/5

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

It names concrete usage contexts (receipts, expense apps, group payments), which gives an agent a clear idea of when this tool applies. It stops short of stating when not to use it or naming an alternative split/rounding tool, so it does not reach the top band.

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