Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Insert Component

insert_component

Insert a part or sub-assembly file into the active assembly at a position in millimeters, returning its instance name, file path and component counts for later mate positioning.

Instructions

Insert a part or sub-assembly file into the active assembly at a position in mm.

Use it after create_assembly, then position components with add_mate. The file must contain solid geometry; an empty or missing file is an error. Needs: an open, active assembly and the file on disk. Changes: adds a component. Returns: component with its instance name (component, which add_mate takes), file_path, position and the counts before and after.

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": "insert_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe component. `file_path` is required; `x`, `y`, `z` (mm from the assembly origin) default to 0.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare readOnly=false and idempotent=false, so the description carries real weight here and does: it states prerequisites (open active assembly, file on disk), a failure mode (empty or missing file is an error), and the mutation effect (adds a component). The return-value sentence overlaps the output schema, which is why this isn't 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.

Conciseness5/5

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

Front-loaded action statement followed by labeled Needs/Changes/Returns lines; every clause adds a distinct fact with no padding.

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 non-idempotent mutation with a nested parameter object, the description covers prerequisites, error conditions, side effect, follow-up tool, and return shape. Combined with a 100%-covered schema and an existing output schema, an agent has everything needed to invoke it correctly.

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 schema already documents file_path, x/y/z defaults, and the "centre not origin" nuance in more detail than the description. The description adds only that positions are in mm, so baseline 3 applies.

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?

Specific verb and resource: "Insert a part or sub-assembly file into the active assembly at a position in mm." It also scopes the input type (part or sub-assembly) and the effect, which separates it from siblings like replace_component or create_assembly without needing their schemas.

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 explicit sequencing: use after `create_assembly`, then position with `add_mate`, which tells the agent where this fits in a workflow. It stops short of stating when to prefer replace_component or set_component_state instead, so the alternative-routing guidance is incomplete.

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