Skip to main content
Glama
onshape-mcp

onshape-mcp

by gpambrozio

Measure clearance between two bodies

onshape_clearance
Read-only

Minimum distance between two solid bodies in the same Part Studio, each named by part id or by the feature that created it. 0 (clear: false) means they touch or overlap, so this is also the interference check — e.g.

Instructions

Minimum distance between two solid bodies in the same Part Studio, each named by part id or by the feature that created it. 0 (clear: false) means they touch or overlap, so this is also the interference check — e.g. a bracket against a dummy servo body. Returns inches and millimetres, plus the closest point on each body.

Input Schema

NameRequiredDescriptionDefault
aYesThe first body: give exactly one of part or feature.
bYesThe second body: give exactly one of part or feature.
wsYesWorkspace id — the <ws> segment of the document URL.
docYesDocument id — the <doc> in cad.onshape.com/documents/<doc>/w/<ws>/e/<elem>.
elemYesElement id (tab) — the <elem> segment of the document URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true; the description adds real behavioral context by defining what a 0 result means (touch or overlap) and by disclosing the return payload (inches and millimetres, closest point on each body). It leaves error behavior for a missing or ambiguous body reference unstated, which keeps it off a 5.

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 sentences, front-loaded with the core measurement semantics, then the zero-case interpretation, then the return format. The bracket/servo example is short and materially illustrates the interference use case rather than padding.

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?

With no output schema, the description correctly takes on return-value disclosure — units, closest points, and the clear flag — and states the same-Part-Studio scope constraint. A read-only, fully-schema'd tool needs little more; only failure modes are omitted.

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% and the nested a/b objects already document 'give exactly one of part or feature', so the description's restatement of that naming scheme adds reinforcement rather than new meaning. Baseline 3 is correct when the schema carries the parameter burden.

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 verb and resource — minimum distance between two solid bodies in the same Part Studio — and pins the body identification scheme (part id or creating feature). This cleanly separates it from onshape_measure (generic measurement), onshape_mass_properties, and onshape_get_body_details without needing to open any 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?

Explicitly frames the tool as the interference check and gives a concrete use case (a bracket against a dummy servo body), plus the same-Part-Studio precondition. It stops short of naming when to prefer the sibling onshape_measure instead, so there is no true when-not guidance.

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