Skip to main content
Glama

Calculate an expression

calculate
Read-onlyIdempotent

expression uses numbers, parentheses, and + - * / %. Paid like hash_text. POST https://api.agentpaywire.com/v1/tools/calc.

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": "calculate"
  }
}

Input Schema

NameRequiredDescriptionDefault
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false, closed-world). The description adds genuinely new behavioral context: the call is billed/paid on the same basis as hash_text, and it names the concrete POST endpoint. It omits error behavior on malformed expressions and what the response contains.

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?

Two terse sentences, front-loaded with the grammar that constrains the input, followed by cost and endpoint details. Slightly telegraphic phrasing ('Paid like hash_text') but no wasted words.

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

Completeness3/5

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

For a one-parameter, no-output-schema tool this covers input syntax, cost model, and transport endpoint. It leaves the return value, error handling on invalid expressions, and precision/limits unstated, which an agent would want before relying on the result.

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 0% and the schema only declares a bare string, so the description carries the full burden for the single parameter — and it does, defining the allowed tokens and operators for the expression. It does not specify output type or numeric limits, but the core parameter meaning is well covered.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (calculate) and the exact grammar of the resource (numbers, parentheses, + - * / %), so an agent knows this evaluates an arithmetic expression. It stops short of stating the output (numeric result vs. string) and does not differentiate from siblings such as convert_units.

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

Usage Guidelines2/5

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

No explicit when-to-use or when-not-to-use guidance against alternatives. The only contextual signal is 'Paid like hash_text', which implies the credit cost model but says nothing about when this tool is the right choice over, say, convert_units or new_id.

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