Skip to main content
Glama
hjbaard

SolidWorks-MCP

replace_component

Swaps a component in a SolidWorks assembly for another part or assembly file, preserving placement and reattaching mates; also resolves vanished components after a part is rebuilt at the same path.

Instructions

Put another part or assembly file in the place of a component of the current assembly.

Keeps its position and, with reattach_mates, its mates where they still find their faces; mate_errors lists the ones that do not. Also the cure for a component that vanished after its part was made anew under the same path. Returns the new component (name, path, placement, bounding box).

Input Schema

NameRequiredDescriptionDefault
nameYes
pathYes
reattach_matesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.17.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does substantial work: position is preserved, mates are reattached conditionally via reattach_mates, failures surface through a `mate_errors` list, and the return payload is enumerated (name, path, placement, bounding box). Undisclosed are preconditions such as read-only documents, undo/irreversibility, and whether the original component's children or subcomponents survive.

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 replacement action and its mate-preservation behavior are front-loaded, and each sentence carries a distinct fact. The `mate_errors` sentence is a sentence fragment appended awkwardly, but no content is padding.

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 3-parameter mutation tool with no annotations and no output schema, the definition covers the essentials: what changes, what persists (placement, mates), how failures are reported, and what comes back. The remaining gap is the resolution rules for the two required parameters, which an agent cannot verify before calling.

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 0%, so the description must carry all meaning; it explains reattach_mates well (and its effect on mates that no longer find their faces) but leaves `name` and `path` entirely undefined. The agent must infer that `name` identifies the existing component and `path` the replacement file, and nothing says whether the path is absolute or workspace-relative.

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 opening sentence names a specific verb+resource+scope: substituting another part or assembly file for a component of the current assembly. It is clearly distinguishable from insert_component or delete_component by the in-place replacement framing, though no sibling is named explicitly.

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 gives a concrete situational trigger — 'the cure for a component that vanished after its part was made anew under the same path' — which is a real repair scenario an agent can pattern-match on. It lacks an explicit when-not statement or named alternative (e.g. insert_component, delete_component), so it stops short of full routing guidance.

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