Skip to main content
Glama
FullyDefined – AI for SOLIDWORKS

FullyDefined – AI for SOLIDWORKS

measure_distance

Measure the minimum distance, gap or angle between two points, faces, edges, cylinders or sketch references in a SOLIDWORKS part or assembly.

Instructions

Measure between two model points, or between the two faces or edges at those points. For faces and edges it returns the minimum distance, the normal distance when they are parallel, and the angle when they are not. In an assembly, measure between two references ref1 / ref2, picked as in add_mate, including edges and vertices by edge_id / vertex_id from list_component_faces with include (also on parts inside sub-assemblies): the result has the minimum distance, for two flat faces the angle between them and the gap when parallel, and for two cylinders the axis-to-axis distance. distance is always the MINIMUM (to a small face this can be to its edge); normal_distance is the PERPENDICULAR distance to the plane (parallel faces, or a point and a flat face). Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "measure_distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
ref1NoWhat to pick. One of: {point} the face at an assembly point; {component, point} the face of that component at the point; {component, face_id} a face from list_component_faces; {component, edge_id or vertex_id} from list_component_faces(include); {component, sketch, point_id} or {component, sketch, segment_id} a sketch point or segment from list_component_sketches; {component, plane} / {component, axis} / {component, origin: true} the part's own plane, axis or origin; {plane} / {axis} / {origin: true} the assembly's own. A component inside a sub-assembly is named by its path, e.g. 'Door-1/Slat-3'.
ref2NoWhat to pick. One of: {point} the face at an assembly point; {component, point} the face of that component at the point; {component, face_id} a face from list_component_faces; {component, edge_id or vertex_id} from list_component_faces(include); {component, sketch, point_id} or {component, sketch, segment_id} a sketch point or segment from list_component_sketches; {component, plane} / {component, axis} / {component, origin: true} the part's own plane, axis or origin; {plane} / {axis} / {origin: true} the assembly's own. A component inside a sub-assembly is named by its path, e.g. 'Door-1/Slat-3'.
unitNomm, cm, m, inch or ft
point1No
point2No
betweenNopoints = straight distance between the two points; faces = between the faces containing the points; edges = between the edges nearest the pointspoints
toleranceNoHow far a point may be from its face / edge (default 0.5 mm)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so well: it declares the tool read-only, defines what distance (minimum, possibly to a small face's edge) and normal_distance (perpendicular to plane) actually mean, and states which result variant applies for flat faces, parallel faces, and cylinders. It omits failure behavior when a point is farther than tolerance from a face or edge.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key constraint (distance is MINIMUM, normal_distance is PERPENDICULAR) is front-loaded, but the result semantics are effectively stated twice, once generally and once for the assembly case, which makes the text longer than needed.

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 7-parameter nested-reference tool with no output schema and no annotations, the description covers return shape, reference construction, and read-only behavior well. The remaining gap is the absence of any guidance on unit and tolerance effects and on error conditions.

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 71% and the description adds real meaning beyond it: it explains how ref1/ref2 objects are composed (which fields pair together), that sub-assembly components are named by path, and that between=points/faces/edges selects the straight, face-to-face, or edge-to-edge measurement. unit and tolerance are left entirely to the schema.

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 plus the full scope of what can be measured (points, faces, edges, assembly references) and what is returned. It does not distinguish itself from the sibling measure_part, so an agent choosing between measurement tools still has to infer the split.

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?

Clear context is given: use point1/point2/between for plain geometry, and ref1/ref2 in an assembly, with the exact source tools for each id (list_component_faces with include, list_component_sketches, list_components). There is no explicit when-not-to-use guidance or comparison against measure_part.

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