Skip to main content
Glama

polygon_calculate

Read-onlyIdempotent

Calculate a regular polygon's area, perimeter, angles, apothem, circumradius, and diagonals from its number of sides and side length.

Instructions

Calculate properties of a regular polygon: area, perimeter, angles, apothem, circumradius, diagonals.

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": {
      "sides": "<sides>",
      "side_length": "<side_length>"
    },
    "name": "polygon_calculate"
  }
}

Input Schema

NameRequiredDescriptionDefault
sidesYesNumber of sides (>= 3).
side_lengthYesLength of each side.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, so the safety profile is fully covered and a pure-computation tool needs little more. What the description does add is the set of returned properties, which matters because there is no output schema; however it omits units (degrees vs radians for angles) and whether any properties can be null.

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?

A single sentence with zero filler, and the resource is stated before the enumerated outputs so the agent gets the identity of the tool first.

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?

There is no output schema, and the description partially compensates by listing the computed properties. But for a numeric calculation tool it leaves the agent guessing on units (angle measure, side_length units) and on how results are presented, which is a real gap for downstream use.

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% and both parameters are documented with constraints ('Number of sides (>= 3)', 'Length of each side'), so the schema does the work. The description adds no unit conventions or validation nuance beyond that baseline.

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?

Clear specific verb+resource: 'Calculate properties of a regular polygon', and it enumerates which properties (area, perimeter, angles, apothem, circumradius, diagonals). This distinguishes it reasonably from generic siblings like area_calculate or triangle_solve, though it never names an alternative explicitly.

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?

The description contains no when-to-use guidance, no prerequisites, and no comparison to the many sibling math tools (area_calculate, triangle_solve, proportion_solve). An agent must infer that this is for regular polygons only, not arbitrary shapes.

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

Deploy Server

Other Tools