Skip to main content
Glama
TommeCAD FreeCAD MCP

TommeCAD FreeCAD MCP

measure_distance

Measures the minimum distance in millimeters between two BRep objects or selected faces, edges, or vertices in one FreeCAD document, returning up to 32 closest-point pairs.

Instructions

Minimum distance in mm between finite BReps, with up to 32 closest-point pairs in document-global coordinates. Stale selections fail.

Contract: explicit internal names recommended. Length mm, area mm^2, volume mm^3; field units override defaults. Errors: invalid_arguments, document_not_found, object_not_found, transaction_conflict, operation_failed, execution_timeout; transport failures are possible. Timeout is not cancellation: never blindly retry mutations. Legacy return shape preserved.

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": {
      "first": "<first>",
      "second": "<second>"
    },
    "name": "measure_distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
firstYesWhole object {document,object} at current state, or complete issued subelement selection with revision. Both targets must be in one document; global mm.
secondYesWhole object {document,object} at current state, or complete issued subelement selection with revision. Both targets must be in one document; global mm.

Output Schema

NameRequiredDescriptionDefault
dataNo
errorNo
statusYes
warningsNo
referencesNo
contract_versionNo1.0

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A3.6/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does a fair job: it discloses the mm unit contract, the same-document constraint, the potential for stale-selection failure, an enumerated error set, and the distinction between timeout and cancellation. Gaps remain (no explicit statement that it is a non-mutating read, and 'Legacy return shape preserved' is opaque), but the behavioral disclosure is well above average for an unannotated tool.

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 leading sentence is well front-loaded and informative. The remainder mixes relevant constraints with generic boilerplate: the area/volume unit mappings are irrelevant to a distance measurement, and the error catalog and 'never blindly retry mutations' caveat read as shared template text rather than tool-specific guidance.

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 two-parameter measurement tool with full schema coverage and an output schema (so return values need not be explained), the description covers units, target validity, revision staleness, and failure modes adequately. The only notable omission is explicit differentiation from the sibling distance/angle measurement tools.

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 schema already documents that each target is either a whole object or a complete issued subelement selection with revision, that both must share a document, and that units are global mm. The description largely restates this. It adds 'finite BReps' as a validity condition but little else beyond 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?

The description gives a specific verb and resource: it returns the minimum distance in mm between finite BReps, plus up to 32 closest-point pairs in document-global coordinates. That is far more precise than the bare name. It does not, however, say how this differs from the sibling 'measure' or 'measure_angle', so an agent must infer that this one is distance-specific.

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?

It states real preconditions: 'Stale selections fail', 'explicit internal names recommended', and both targets must live in one document. These help the agent call it correctly, but there is no explicit statement of when to choose this tool over 'measure' or the sketch constraint tools, so usage is implied rather than routed.

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