Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Save Body as Part

save_body_as_part
DestructiveIdempotent

Saves a named solid body from an active multibody part as a new .sldprt file, splitting multibody designs into separate parts.

Instructions

Save one solid body of the active multibody part as a new part file (Insert > Features > Save Bodies).

Use it to split a multibody part into parts, e.g. after create_extrusion without merging. Needs: an open, active part with the named body and an existing target folder. Changes: adds a Save Bodies feature to the part and writes the new .sldprt; closes any new, unsaved assembly SolidWorks opens alongside. Returns: data with body, file_path, feature, solid_bodies (every body name, to correct a wrong one) and closed_documents.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe body. `body_name` and `file_path` (a .sldprt) are required.

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?

Beyond destructiveHint=true, the description names the specific side effects: a Save Bodies feature is added to the source part, a new .sldprt is written, and any newly opened unsaved assembly is closed. That 'closes documents' detail is exactly the kind of consequence an agent cannot infer from annotations. It does not address overwrite behavior when the target .sldprt already exists.

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 single-sentence purpose followed by compact Needs/Changes/Returns blocks; every line carries operational information and nothing is padded.

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 destructive, file-writing tool with a nested schema, the description covers prerequisites, mutations, side effects, and even what the response fields mean for correction. An output schema exists, so the returns coverage is bonus rather than a gap.

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 both nested properties already document the body name example and the parent-directory requirement, so the description's 'named body' and 'existing target folder' phrasing largely restates the schema. It adds no new syntax, naming convention, or edge-case guidance for the parameters.

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?

States a specific verb and resource with tight scope: 'Save one solid body of the active multibody part as a new part file', and anchors it to the SOLIDWORKS command (Insert > Features > Save Bodies). It is clearly distinguishable from a generic save in practice, but it never names a sibling such as save_part or save_as to explicitly route the agent away from them.

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 a concrete use case ('split a multibody part into parts, e.g. after create_extrusion without merging') and lists prerequisites (open active part with the named body, existing target folder). It stops short of stating when NOT to use it or naming the alternative tool for a full-part save.

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