Skip to main content
Glama
NejcDvorsek

SolidWorks MCP

by NejcDvorsek

set_equation

Add or replace a SolidWorks equation to persist parametric relations, then rebuild and remeasure. Use for global variables or linking dimensions without losing the relation.

Instructions

Add an equation, or replace the one that sets the same name; rebuild and remeasure.

A SolidWorks equation string, e.g. '"D1@BlockExtrude" = 25' or '"D1@BlockExtrude" = 2 * "D1@Sketch1"'. A global variable is '"W" = 40'; link a dimension to it with '"width@Sketch1" = "W"', and set '"W" = 45' again to change it. Persists a relation (unlike set_dimension). A list of equations is set in order with one rebuild at the end (later ones may use earlier ones), and a refused one undoes the whole list. Returns the index (per equation for a list), whether it replaced one, the features that fail to rebuild (failing_features) and mass properties.

Input Schema

NameRequiredDescriptionDefault
equationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.16.3

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the rebuild/remeasure side effect, replacement-on-name-collision, ordered evaluation of a list with a single rebuild, and atomic rollback ('a refused one undoes the whole list'). It also enumerates the return payload (index, replaced flag, failing_features, mass properties), which compensates for the absent output schema.

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?

The purpose sentence is front-loaded, followed by syntax examples, list semantics, and return values in a logical progression. Every block adds information an agent needs; nothing is redundant with structured fields.

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?

For a one-parameter tool with no annotations and no output schema, the description covers purpose, syntax, list atomicity, side effects, and return shape. An agent has 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.

Parameters5/5

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

Schema coverage is 0% and the schema only says 'Equation' with an anyOf string/array, so the description must compensate and does: it gives concrete SolidWorks equation syntax, explains how global variables and dimension links work, and clarifies that a list is accepted and processed in order. This is meaning the schema cannot convey.

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 ('Add an equation, or replace the one that sets the same name') and immediately names the discriminating sibling behavior ('Persists a relation (unlike set_dimension)'). An agent can distinguish this from set_dimension and list_equations without opening 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 contrasts with set_dimension on persistence, which routes the agent correctly for relation-preserving edits, and the example of a global variable re-set to change a value shows the intended workflow. It stops short of stating an explicit when-not condition (e.g. use set_dimension for one-off value changes).

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