Skip to main content
Glama

Calculate exactly

tcp_calculate
Read-onlyIdempotent

Calculates exact decimal prices and totals from arithmetic expressions with time units (h, d, week, month) and labels such as EUR, GB, GiB, vCPU, and Mbit.

Instructions

Exact decimal arithmetic for prices and totals: + - * / ** and sum, min, max, abs, round(x, places), ceil, floor, pct(part, whole). Units count in hours: h, d (24 h), week (168 h), month (720 h, as the TCP price calculator counts it); EUR, GB, GiB, vCPU and Mbit are labels. Example: 0.051 EUR/h * 3 * 1 month. Use it for every number you compute.

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": {
      "expression": "<expression>"
    },
    "name": "tcp_calculate"
  }
}

Input Schema

NameRequiredDescriptionDefault
placesNoround the result to this many places, half up
expressionYesthe arithmetic, such as '0.051 EUR/h * 720 h * 3'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2026.12.4

TDQS

A4.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 genuinely non-obvious semantics: unit counting (h, d = 24 h, week = 168 h, month = 720 h as the TCP price calculator counts it) and that EUR/GB/GiB/vCPU/Mbit are treated as labels rather than converted. It does not mention error behavior such as division by zero or the result's return type, which keeps it off a 5.

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

Conciseness5/5

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

Dense, front-loaded, and ordered as purpose → operator list → unit semantics → example → directive. Every clause carries information; nothing restates the name or the annotations.

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 two-parameter calculator with no output schema, the description covers operations, unit interpretation, and rounding via the schema. The remaining gap is what the return value looks like (decimal string vs number) and how invalid expressions surface as errors, which an agent would need to handle failures.

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?

With schema coverage at 100%, the baseline is 3, and the description earns above that by explaining the expression grammar (operator list, pct(part, whole), round(x, places)) and the meaning of the unit tokens that the schema only hints at in a single example. The 'month = 720 h' interpretation in particular is knowledge an agent cannot derive from the schema alone.

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?

States a specific verb and resource ('Exact decimal arithmetic for prices and totals') and enumerates the supported operators and functions, so an agent knows exactly what capability it gets. It also separates itself from the sibling lookup tools by declaring it is the computation tool: 'Use it for every number you compute.'

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?

Gives a strong, explicit directive — 'Use it for every number you compute' — which tells the agent both when to reach for it and why not to do mental arithmetic. It stops short of naming a when-not condition or naming an alternative sibling, but for a calculator the guidance is effectively complete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.