Skip to main content
Glama

TinyFn

haversine_distance

Calculate distance between two coordinates using Haversine formula.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lat1YesLatitude of point 1
lat2YesLatitude of point 2
lon1YesLongitude of point 1
lon2YesLongitude of point 2
unitNoUnit: km or mikm

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitYes
point1Yes
point2Yes
distanceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries full burden. It only states the formula but does not disclose output details, unit handling, precision, or spherical Earth assumptions. Basic behavioral traits are missing.

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?

Single sentence, no redundancy, front-loaded with verb and resource. Every word 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?

Given the presence of an output schema (though unseen), the description adequately covers the tool's purpose. For a simple calculation with well-defined inputs, it is sufficiently complete, though it could mention the return type.

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% with clear parameter descriptions (e.g., 'Latitude of point 1'). The tool description adds no extra meaning beyond 'using Haversine formula', which is method-level, not parameter-specific. 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?

The description clearly states the verb 'Calculate' and resource 'distance between two coordinates using Haversine formula'. It distinguishes from siblings like 'distance' by specifying the formula, but does not explicitly mention geographic coordinates, though parameter names imply it.

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?

No guidance on when to use this tool versus alternatives like 'distance', 'calculate_bearing', or 'bounding_box'. The description does not provide when-not or alternative suggestions.

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.