Skip to main content
Glama
bangladesh-mcp

bangladesh-mcp

by sarif-mia

calculate_expression

Read-onlyIdempotent

Safely evaluate math expressions with operators, parentheses, factorials, trig, logs, and roots, choosing degree or radian angles.

Instructions

Evaluate a maths expression safely, e.g. "2*sin(30) + sqrt(16) + 5!".

Args: expression: Supports + - * / // % ^ **, parentheses, !, pi, e, tau and sqrt, cbrt, root, exp, log, ln, sin, cos, tan, asin, acos, atan, factorial, abs, power, percent, mod. angle_unit: "deg" (default) or "rad" for trigonometric functions.

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_expression"
  }
}

Input Schema

NameRequiredDescriptionDefault
angle_unitNodeg
expressionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/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 'safely' and enumerates the accepted operator/function vocabulary, but says nothing about error behavior for malformed expressions or about evaluation limits, which is the main behavioral gap.

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?

Front-loaded one-line summary followed by a compact Args block; the long function list is necessary content rather than padding, though the pseudo-Python 'Args:' formatting is slightly awkward for a tool description.

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?

An output schema exists so return values need no explanation, and both parameters are meaningfully documented. The only shortfall is the absence of any note on invalid-expression handling and on whether angle_unit also governs inverse trig functions.

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 0% schema description coverage, the description carries the full load and does so well: it lists the supported operators and functions for `expression` and states that `angle_unit` takes "deg" (default) or "rad" for trig functions, information absent from the schema (which types angle_unit as a bare string with no enum).

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 ('Evaluate a maths expression') plus a scoping qualifier ('safely') and a concrete example, which makes it unambiguous against the numeric-utility siblings such as income_tax or loan_emi.

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

Usage Guidelines3/5

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

Usage is only implied through the worked example; there is no explicit statement of when to prefer this tool over a sibling or when it is inappropriate (e.g., symbolic algebra, unit-bearing values).

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