Skip to main content
Glama
Mapbox MCP Server

Mapbox MCP Server

Official
by mapbox

Calculate Midpoint

midpoint_tool
Read-onlyIdempotent

Calculates the geographic midpoint between two coordinates along the great circle path, returning the halfway point without API calls.

Instructions

Calculate the geographic midpoint between two coordinates. Returns the point that is halfway between the two input points along the great circle path. Works offline without API calls.

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": {
      "from": "<from>",
      "to": "<to>"
    },
    "name": "midpoint_tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesEnding coordinate
fromYesStarting coordinate

Output Schema

NameRequiredDescriptionDefault
toYes
fromYes
midpointYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.18.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv0.12.6

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond that: the result is computed along the great circle rather than as a naive coordinate average, and the computation is local ('offline without API calls'). It stops short of noting edge cases such as antipodal or identical input points.

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?

Three short sentences, front-loaded with the core action, then the output semantics, then the operational constraint. No filler or restatement of the title beyond what is necessary.

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?

The tool is simple, both required parameters are fully documented by the schema, annotations cover the safety profile, and an output schema exists so return values need not be explained. The description is nearly complete; only minor edge-case behavior (antimeridian, identical points) is unaddressed.

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 both nested coordinate objects documented ('Starting coordinate', 'Ending coordinate'), so the baseline is 3. The description adds nothing about the from/to ordering or coordinate units that the schema does not already carry, which is acceptable here because the operation is symmetric.

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?

"Calculate the geographic midpoint between two coordinates" gives a specific verb and resource, and the follow-up sentence pins down the algorithm ('halfway between the two input points along the great circle path'). That cleanly separates it from planar centroid/bbox operations in the sibling set, though it never names an alternative tool explicitly.

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?

Usage is implied by the purpose (two points in, one point out) and reinforced by "works offline without API calls," which tells the agent it needs no network or token. There is no explicit when-to-use/when-not guidance and no pointer to alternatives such as centroid_tool or distance_tool for other spatial questions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.