Skip to main content
Glama

Triangle Calculator

calculator_triangle
Read-only

Triangle area, perimeter, missing side (SAS), or missing angle. Supports SSS (Heron), base+height, and angle completion.

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

Input Schema

NameRequiredDescriptionDefault
baseNoBase for area.
heightNoHeight for area.
side_aNoSide a.
side_bNoSide b.
side_cNoSide c.
angle_aNoAngle A in degrees.
angle_bNoAngle B in degrees.
angle_cNoAngle C in degrees (included for SAS).
calculationNoarea|perimeter|missing_side|missing_angle|allall

Output Schema

NameRequiredDescriptionDefault
resultNo
expressionYes
calculationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so the safety profile is fully covered by structured data. The description adds that several distinct solving strategies are supported, but says nothing about behavior with insufficient or inconsistent inputs (e.g., SSS violating the triangle inequality), and nothing about what the default 'all' returns. With annotations carrying the safety burden, a 3 is appropriate.

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 with zero filler, and the output list is front-loaded ahead of the supported-method list. It is telegraphic in places, but no sentence could be removed without losing content.

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?

For a 9-parameter, all-optional tool whose hard part is choosing the right parameter set, the description covers the main mode-to-input mappings, and the output schema and 100% schema coverage handle return values and field definitions. The remaining gap is per-mode parameter enumeration and failure behavior, which is minor given the other structured data.

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 100%, so the baseline is 3, but the description adds real meaning the schema does not: it links input combinations to computation modes (base+height for area, all three sides for Heron's SSS, SAS for the missing side). The schema fields themselves are minimal labels like 'Side a.', so this mapping is the only place the combination logic is documented.

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?

The description names the resource (triangle) and the specific outputs it computes: area, perimeter, missing side via SAS, and missing angle. That is more than a restatement of the title and tells an agent exactly what class of problem it solves. It does not differentiate from the closest sibling, calculator_right_triangle or calculator_trigonometry, 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 mention of 'SSS (Heron), base+height, and angle completion' implies which input combinations map to which mode, which is implicit usage guidance. However, there is no explicit when-to-use statement, no exclusions, and no routing to calculator_right_triangle for right-triangle cases. Usage is inferable but not stated.

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.