Skip to main content
Glama

Square Calculator

calculator_square
Read-only

Square area, perimeter, diagonal, side. Example: side 5 → area 25, perimeter 20, diagonal ≈7.071.

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

Input Schema

NameRequiredDescriptionDefault
areaNoKnown area.
sideNoSide length.
diagonalNoKnown diagonal.
perimeterNoKnown perimeter.
calculationNoarea|perimeter|diagonal|side|allall

Output Schema

NameRequiredDescriptionDefault
areaYes
sideYes
resultYes
diagonalYes
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 establish readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real value by showing the derivation direction (one known value in, the others out), but it is silent on behavior when multiple conflicting inputs are supplied, when none are supplied, and what happens with the 'calculation' selector.

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 sentences, front-loaded with the quantities and followed by a single high-value example; no filler. Slightly telegraphic ('Square area, perimeter, diagonal, side.') rather than a complete statement of action.

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?

With 5 optional parameters, an output schema present, and full annotation coverage, the description is close to sufficient. The missing piece is the input contract: with zero required parameters the agent needs to be told that it must supply exactly one known quantity (and how conflicts are resolved), which the description never states.

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 schema already documents each of the five parameters, and the 'calculation' enum-like values (area|perimeter|diagonal|side|all) are repeated verbatim from the schema rather than expanded. The example values add a little intuition about units/relations but do not explain the mutual-exclusivity/priority rules between area, side, perimeter, and diagonal.

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 resource (a square) and the four quantities it handles (area, perimeter, diagonal, side), and the worked example 'side 5 → area 25, perimeter 20, diagonal ≈7.071' makes the compute-the-other-properties behavior concrete. It is distinguishable from calculator_rectangle/calculator_polygon by the name and the example, though the description never uses an explicit verb like 'computes'.

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 by the example: supply one known dimension, get the rest back. There is no statement of when to prefer this over calculator_area, calculator_rectangle, or calculator_length, and no note that at least one input value is required.

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.