Skip to main content
Glama

UK Data: Maths and statistics

polygon_area_shoelace

Read-onlyIdempotent

Calculates the area of a polygon given its vertices using the shoelace formula (also known as the surveyor's formula). (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
verticesNoarray of [x, y] coordinate pairs, required, the vertices of the polygon in order

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/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 covered. The description adds one genuinely new fact — a cost of 1 credit — but says nothing about behavior on degenerate input (collinear or self-intersecting polygons) or the sign of the result for reversed vertex order.

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 clauses, front-loaded with the operation and algorithm, with the cost note trailing. The parenthetical alias 'surveyor's formula' is marginally redundant but aids recognition; nothing else is wasted.

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?

For a single-parameter, annotation-rich tool this is close to adequate. However there is no output schema, so the description should say what comes back (a numeric area in squared units) and whether reversed vertex order yields a negative value — the one thing an agent cannot get from the structured fields.

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 the schema already documents 'vertices' as ordered [x, y] coordinate pairs. The description adds only the implied consequence that vertex order feeds a shoelace sum; it gives no format examples, no note on accepting a flat string vs array beyond what the anyOf already shows. Baseline 3 applies.

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?

States a specific verb and resource ('Calculates the area of a polygon') and names the exact algorithm (shoelace/surveyor's formula), which is far more specific than the sibling 'calculate_area'. It stops short of explicitly contrasting itself with that sibling, so an agent must infer the difference.

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?

There is no guidance on when to prefer this over 'calculate_area' or other geometry tools, and no prerequisites such as a minimum of three vertices, whether the ring should be closed, or whether clockwise vs counter-clockwise ordering matters. The agent is left to infer all of that.

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.

Resources