Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Distance 2d

calculate_distance_2d
Read-onlyIdempotent

Compute Euclidean distance between two 2D points. Use for geometry, mapping. Formula: √((x2−x1)²+(y2−y1)²). Inputs: x1,y1,x2,y2. Returns distance. See list_bundles for related 'math' calculators.

Input Schema

NameRequiredDescriptionDefault
x1YesX1
x2YesX2
y1YesY1
y2YesY2

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is fully covered; the description adds that the operation is a deterministic pure formula returning the distance, which is useful but modest. No extra notes on units, precision, or error behavior.

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?

Four short sentences, front-loaded with the action, then the formula and inputs. The trailing pointer to list_bundles is mildly promotional but does aid discovery, so nearly all content earns its place.

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 read-only, four-number calculator with a fully covered schema, an output schema, and clear annotations, the description supplies purpose, formula, inputs, and return type — enough to call it correctly. Only unit/precision conventions are left unspecified.

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 coverage is 100%, so the four parameters are formally documented (albeit only as 'X1', 'Y1', etc.). The description adds real value by giving the formula, which explains how the four inputs relate as two ordered points, but it does not clarify coordinate conventions (units, axes, order of points).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Compute Euclidean distance between two 2D points') and disambiguates from the many sibling distance calculators (3d, horizon, flight) by naming the dimensionality and method. The formula reinforces exactly what operation is performed.

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?

'Use for geometry, mapping' gives a broad context but names no exclusion or alternative, even though close siblings like calculate_distance_3d, calculate_pythagoras, and calculate_slope exist. The agent must infer that 2D coordinates are what select this tool over its 3D counterpart.

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.