Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Set Component State

set_component_state
Idempotent

Fix or float assembly components, make sub-assemblies flexible, and hide or make parts transparent to control assembly visibility and motion without changing other component states.

Instructions

Fix or float an assembly component, make a sub-assembly flexible, or hide it or make it transparent.

Float a part so mates can position it (the first part inserted is fixed); fix one to hold it still. Make a sub-assembly flexible so its own mates move in this assembly (a crank whose knob turns). Hide a component (visible false) or make it transparent to see the parts inside. Only what you pass changes: the component's suppression, configuration and other states are kept. Needs: an open assembly. Changes: the states you pass. Returns: state with component, before and after (fixed, flexible, visible and the properties kept), and appearance (visible, transparent) when you changed it.

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_component_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe component and what to change: `fixed`, `flexible`, `visible`, `transparent`, any of them.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavior: "Only what you pass changes: the component's suppression, configuration and other states are kept," which clarifies the partial-update contract, plus the open-assembly precondition and the before/after return shape. Failure modes are not discussed, so not 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action, then organized into when/needs/changes/returns blocks, which is easy to parse. Some content duplicates the schema's parameter descriptions (the fixed and flexible explanations), and the echo/backtick styling is slightly noisy, but nothing is wasted outright.

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 mutation tool with nested parameters, it covers prerequisites, partial-update semantics, and the shape of the result, which is everything an agent needs to invoke it correctly. The return-value explanation is mildly redundant given a separate output schema exists, but it does no harm.

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 per-flag descriptions already explain fixed/visible/flexible/transparent in detail, so the schema does the heavy lifting. The description adds only small bits of meaning, such as the note that the first inserted part is fixed and the crank example for flexible. Baseline 3 is appropriate.

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?

The description opens with a precise verb+resource and enumerates the distinct operations: fix/float a component, make a sub-assembly flexible, hide it, or make it transparent. An agent can tell immediately this is a per-component state mutator, distinct from siblings like insert_component or replace_component.

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 explains the practical conditions for each flag: float a part so mates can position it, fix one to hold it still, make a sub-assembly flexible so its own mates move (crank example), hide to see inside. It also states the prerequisite "Needs: an open assembly." It does not name alternative tools or note when to avoid this one, so it stops short of a 5.

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