Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Set Units

set_units
Idempotent

Sets the active document's length units (mm, cm, m, in, ft) and verifies the change, so you can use consistent dimensions before sketching.

Instructions

Set the active document's length units: mm, cm, m, in or ft.

Use it on a new part before sketching if you want other than the template's units. Aliases such as "inch" are accepted. The setting is read back, so success means it applied. Tool inputs stay in mm whatever the document shows. Needs: an open, active document. Changes: the document's unit system. Returns: data with unit_system, the values applied and observed, and verified.

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": {
      "input_data": "<input_data>"
    },
    "name": "set_units"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe units. `unit_system` (mm, cm, m, in or ft) is required.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare it non-read-only, idempotent and non-destructive; the description goes well beyond that by stating the prerequisite (open, active document), the effect (changes the document's unit system), that the setting is read back and verified, and that internal tool inputs remain in mm regardless of display units. That read-back verification detail is exactly the kind of behavioral context annotations cannot convey.

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?

Front-loaded with the core action and accepted values, then organized into short labeled lines (Needs/Changes/Returns). The 'Returns' line is partly redundant with the existing output schema, which is the only wasted text.

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?

Given an output schema, the description need not document return shape, yet it still flags the key fields and the verification guarantee. Prerequisites, effect, alias handling and the mm-input invariant cover everything needed to call it correctly.

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 100% and the schema already lists the unit strings, so the baseline would be 3. The description adds real meaning beyond the schema by noting that aliases such as 'inch' are accepted (the schema provides no enum and does not mention aliases) and by clarifying that downstream tool inputs stay in mm.

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 ('Set the active document's length units') and enumerates the accepted values (mm, cm, m, in, ft). No sibling tool does unit configuration, and the scope ('active document') is unambiguous, so an agent can select it without opening the 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?

Gives a concrete when-to-use rule: 'on a new part before sketching if you want other than the template's units,' plus the prerequisite of an open, active document. It does not name an alternative or a when-not case, but no sibling plausibly competes for this operation.

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