Skip to main content
Glama

Measure Distance

measure_distance
Read-only

Measure the minimum distance between two entities to verify gaps, clearances, and contact, returning distance in mm and whether they are touching.

Instructions

Minimum (closest-approach) distance between two entities, mm — verify gaps, clearances, and contact. 0 means touching or interpenetrating; for overlap volume use min_clearance / interference_check.

a, b: object handles. a_ref, b_ref: optional sub-shape to measure from instead of the whole solid — an f_* / e_* tag or "FaceN"/"EdgeN" (1-based).

Returns {distance_mm, point_on_a ([x,y,z] mm), point_on_b, touching (distance_mm < 1e-7)}. A measurement: no handle.

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": {
      "a": "<a>",
      "b": "<b>"
    },
    "name": "measure_distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
aYes
bYes
a_refNo
b_refNo
workspaceNoRun this call in this named workspace

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true and openWorldHint=false, so the description adds value beyond them by explaining that 0 means touching or interpenetrating, giving the exact touching threshold (distance_mm < 1e-7), and stating that the call is "A measurement: no handle," which tells the agent that no handle is produced or consumed. It doesn't mention failure modes, such as what happens if a handle is invalid or the ref is out of range.

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?

The purpose, the alternative-tool routing, and then the parameters are all front-loaded, and the return shape comes last. Every clause adds distinct information, with no filler or repetition of the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although there is no output schema, the description fully enumerates the return fields (distance_mm, point_on_a, point_on_b, touching) and their units, which is exactly what an agent needs in order to call the tool and use the result correctly, and the annotations cover the safety profile.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 20% (only workspace has a description), so the description must carry the burden, and it largely does: it explains a/b as object handles and a_ref/b_ref as optional sub-shape selectors, including the accepted tag formats (f_*/e_*, "FaceN"/"EdgeN", 1-based). Only the workspace parameter is left undocumented in the description, though the schema covers it.

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?

The definition states a specific measurement (minimum / closest-approach distance), names the two inputs, gives units (mm), and says what it is for (gaps, clearances, contact). It also distinguishes itself from the sibling tools min_clearance and interference_check by assigning them the overlap-volume case, so an agent can tell the tools apart without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says when to use a different tool: "for overlap volume use min_clearance / interference_check," which is real routing guidance. It doesn't cover prerequisites, such as whether both handles must belong to the same document or workspace, and it doesn't address other near alternatives such as bounding_box or measure_angle, so it isn't fully complete.

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

Deploy Server

Other Tools