Skip to main content
Glama

Rectangle Calculator

calculator_rectangle
Read-only

Rectangle area, perimeter, and missing side. Example: 10×5 → area 50, perimeter 30.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculator_rectangle"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaNoKnown area.
widthNoWidth.
lengthNoLength.
perimeterNoKnown perimeter.
calculationNoarea|perimeter|missing_side|allall

Output Schema

NameRequiredDescriptionDefault
areaYes
widthYes
lengthYes
resultYes
perimeterYes
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered and the description's burden is light. The description adds that it can solve for a missing side, but says nothing about how it behaves when conflicting or insufficient inputs are supplied (e.g., area plus inconsistent width/length).

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 short, front-loaded sentences with no filler and a concrete numeric example. Its brevity is an asset, though the second sentence spends space on a trivial example rather than on the input-flexibility rule.

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?

An output schema exists, so return values needn't be described, and the read-only nature is annotated. Still, for a 5-parameter, all-optional solver whose correctness depends on which fields the agent supplies, the description omits the one rule an agent most needs (arbitrary partial inputs plus the 'calculation' selector).

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 coverage is 100%, so each parameter is already documented, giving a baseline of 3. The description does not clarify the more valuable semantic point: that any subset of length/width/area/perimeter may be provided and the 'calculation' argument selects which quantity is solved for.

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?

Names the specific resource (rectangle) and the exact outputs (area, perimeter, missing side), which is clear enough to distinguish it from generic tools like calculator_area or calculator_geometry_3d. It never disambiguates against near-neighbors such as calculator_square or calculator_parallelogram, so it stops short of a 5.

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?

The worked example (10×5 → area 50, perimeter 30) implies the intended usage pattern, and 'missing side' hints that partial inputs are acceptable. There is no explicit guidance on when to choose this over calculator_square/calculator_area, nor on which parameter combinations are valid.

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.