Skip to main content
Glama
hjbaard

SolidWorks-MCP

set_equation

Add or replace a named SolidWorks equation, then rebuild and remeasure to persist dimension links and catch failing features.

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). Returns the index, whether it replaced one, the features that fail to rebuild (failing_features) and mass properties.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
equationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.5/5.0
Behavior4/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 well: it discloses side effects ('rebuild and remeasure'), the replace-vs-add semantics, persistence behavior, and return contents (index, replaced flag, failing_features, mass properties). It omits any permission/error conditions, so it is strong but not exhaustive.

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 primary action is front-loaded in the first clause, followed by a dense but useful block of format examples. The length is justified by the non-obvious string grammar, though the example sentences could be tightened slightly.

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-param mutation tool with no annotations and no output schema, the description covers action, replace semantics, side effects, return values, and the full parameter format. Nothing essential for correct invocation is missing.

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% (the single 'equation' param has no description), so the description must compensate, and it does richly: it gives concrete syntax for dimension equations, global variables, and dimension-to-variable links ('"width@Sketch1" = "W"'), plus how to mutate an existing variable. This fully defines the parameter's expected format.

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+resource ('Add an equation, or replace the one that sets the same name') and immediately distinguishes itself from a sibling by noting it 'Persists a relation (unlike set_dimension).' An agent can tell what it does and how it differs from set_dimension 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?

It names an explicit alternative (set_dimension) and the condition that separates them ('persists a relation'). However it does not address the plural sibling set_equations, nor when to prefer this over batch/list/delete equation tools, leaving some routing to inference.

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