Skip to main content
Glama
omnioperand-mcp

omnioperand-mcp

omni_regular_polygon_solver

Calculate all dimensions and angles of any regular polygon with 3 to 1000 sides from one known side, area, perimeter, apothem, or circumradius.

Instructions

Universal Regular N-Sided Polygon Solver (3 to 1000 sides): Solves dimensional geometry and internal angles for any regular polygon with n equal sides and vertices (triangles, pentagons, hexagons, heptagons, decagons, etc.).

Governing formulas:

  • Central Angle = 360° / n

  • Interior Angle = [(n - 2) · 180°] / n

  • Perimeter = n · a

  • Apothem (Inradius) = a / [2 · tan(π/n)]

  • Circumradius = a / [2 · sin(π/n)]

  • Area = (n · a · apothem) / 2 = (n · a²) / [4 · tan(π/n)]

BIDIRECTIONAL DRIVER & VALUE PAIRING:

  • Set 'n' to the integer vertex/edge count (3 ≤ n ≤ 1000).

  • Set 'driver' to the name of the single known reference parameter: 'side', 'area', 'perimeter', 'apothem', or 'circumradius'.

  • Set 'value' to its positive numerical magnitude (e.g. driver='area', value=250.0).

  • The solver algebraically backsolves all remaining 5 geometric dimensions simultaneously.

USAGE GUIDELINES:

  • WHEN TO USE: Invoke for arbitrary regular polygons with n sides (3 ≤ n ≤ 1000) when calculating area, inradius, circumradius, perimeter, or internal angles from any single known dimension.

  • WHEN NOT TO USE: Do not use for irregular polygons, non-planar polygons, or 3D polyhedra.

  • SIBLING ROUTING: For 8-sided regular octagons specifically, ROUTE TO 'omni_octagon_solver' instead to receive exact closed-form radical representations (e.g. 2·(1+√2)·a²) without trigonometric floating-point rounding. For arbitrary n (e.g. n=3, 5, 6, 7, 9, 10, 12, ...), use 'omni_regular_polygon_solver'.

BEHAVIOR & SAFETY:

  • Pure deterministic trigonometric computation with machine floating-point precision.

  • Read-only, idempotent, and stateless. Zero side effects or external network mutations.

  • Input validation: Enforces 3 ≤ n ≤ 1000 and value > 0. Out-of-bounds parameters return safe diagnostic error.

  • Output floating-point metrics rounded to user-specified precision (between 2 and 14 decimal places, default 6).

RETURNS:

  • Structured JSON object containing:

    • source (string): Canonical documentation URL

    • sides_n (number): Vertex count n

    • driver_parameter (string): The reference parameter used

    • driver_value (number): Reference parameter magnitude

    • side_length (number): Regular edge length a (linear units)

    • perimeter (number): Boundary length (linear units)

    • area (number): Total enclosed polygon area (square units)

    • apothem_inradius (number): Center-to-edge inradius (linear units)

    • circumradius (number): Center-to-vertex outer radius (linear units)

    • interior_angle_deg (number): Vertex interior angle in degrees

    • central_angle_deg (number): Central sector angle in degrees

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": {
      "value": "<value>"
    },
    "name": "omni_regular_polygon_solver"
  }
}

Input Schema

NameRequiredDescriptionDefault
nNoTotal number of polygon vertices/sides (integer between 3 and 1000, default 8).
valueYesNumerical positive magnitude of the known driver parameter (e.g. 10.0).
driverNoThe known reference parameter driving the bidirectional calculation. Pairs with 'value' to invert all other dimensions.side
precisionNoDecimal places of precision for numerical outputs (between 2 and 14, default 6).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.2
    • addedInput schema / properties / driver / description
      Added value: +"The known reference parameter driving the bidirectional calculation. Pairs with 'value' to invert all other dimensions."
    • changedInput schema / properties / n / description
      Previous value: -"Number of polygon vertices/sides"New value: +"Total number of polygon vertices/sides (integer between 3 and 1000, default 8)."
    • addedInput schema / properties / precision / description
      Added value: +"Decimal places of precision for numerical outputs (between 2 and 14, default 6)."
    • changedInput schema / properties / value / description
      Previous value: -"Numerical value of the driving parameter"New value: +"Numerical positive magnitude of the known driver parameter (e.g. 10.0)."
  2. First observedv0.1.0

TDQS

Score is being calculated.

Deploy Server

Other Tools