Skip to main content
Glama
hjbaard

SolidWorks-MCP

measure_distance

Calculate the smallest distance from a SolidWorks component to another component, point, or axis in an assembly to check clearances and contact, returning nearest point and inside-material status.

Instructions

The smallest distance (mm) from a component to another one, a point or an axis.

Give component_b; or point_mm = [x, y, z] in assembly mm, and the nearest point on the component comes back too, with inside: true when the point lies in its material; or axis_mm = [[x, y, z], [dx, dy, dz]], the endless line through that point along that direction, such as a bolt's axis. 0 means they touch or overlap; check_interference tells which. Sub-assemblies count with all their parts; one part inside is 'Leg-1/Thigh-1'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
axis_mmNo
point_mmNo
component_aYes
component_bNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.13.0
    • addedInput schema / properties / axis_mm
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {},
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Axis Mm"
      +}
  2. Addedv0.9.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full disclosure burden. It reveals units (mm), that the nearest point is returned, the meaning of inside, the meaning of 0 distance, and that sub-assemblies include all parts. It does not explicitly state that the operation is read-only or non-destructive, which is a minor gap for a measurement tool.

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?

The description is front-loaded with the core purpose and then compactly explains input formats and edge cases. It is dense but every clause adds useful information; a slightly cleaner structure would improve readability.

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 no annotations and no output schema, the description does a good job covering input alternatives, units, return hints, and sub-assembly behavior. It could still clarify component_a’s expected string format and confirm the read-only nature, but it is largely complete for a distance-measurement tool.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does: point_mm is documented as [x, y, z] in assembly mm, axis_mm as [[x, y, z], [dx, dy, dz]], and component_b is explained as the alternative target. Component_a is implied as the source component.

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 measurement verb and resource: smallest distance in mm from component_a to component_b, a point, or an axis. It also explicitly routes overlap/touch questions to the sibling tool check_interference, distinguishing it from nearby interference-checking tools.

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?

Clearly explains how to use each alternative target input: pass component_b, point_mm, or axis_mm. It also tells the agent that a distance of 0 should be interpreted with check_interference, but it does not explicitly state when not to use the tool or list all alternative measurement tools.

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