Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Save File

save_file
DestructiveIdempotent

Saves the active SolidWorks part, assembly, or drawing to its current path or a new path in native format, so changes are kept and optional overwrite is controlled.

Instructions

Save the active part, assembly or drawing, to its own path or to a new path in its own format.

Use it after changes you want to keep. A new file_path is checked before SolidWorks is asked: its folder must exist and be writable, it must end in the document's extension (.sldprt, .sldasm, .slddrw), and a file already there is kept unless overwrite is on. To write another format, use save_as or an export_* tool; to copy an assembly with its parts, pack_and_go_assembly. Needs: an open, active document, already saved once unless you give a path. Changes: writes the file. Returns: file_path (when given) and data from the save.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe save. Nothing is required: give `file_path` to save to a new path, or omit it to save in place; `overwrite` is off.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by describing pre-flight validation: the folder must exist and be writable, the path must end in the document's extension, and an existing file is preserved unless overwrite is on. This qualifies the destructiveHint=true annotation with a concrete condition, and it declares the write side effect and prerequisites the annotations cannot express.

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-loads the core statement, then uses compact 'Needs:', 'Changes:', 'Returns:' blocks so each fact is scannable and non-redundant. The telegraphic phrasing is dense but every clause carries distinct information; minor polish would be needed for a 5.

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 mutation tool with prerequisites and overwrite risk, it covers preconditions, side effects, validation behavior, and routing to alternatives, and it summarizes the return shape despite an output schema existing. Nothing an agent needs to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3, but the description adds real meaning: it explains the extension constraint as an enforced check, the folder/writability precondition, and the precise 'kept unless overwrite is on' semantics. The nested input_data wrapper itself is not discussed, which keeps it below a 5.

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 concrete verb and resource ('Save the active part, assembly or drawing') plus the scope of destination ('its own path or a new path in its own format'). It explicitly names the siblings it is not (save_as, export_*, pack_and_go_assembly), so an agent can route 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a positive trigger ('use it after changes you want to keep') and two explicit exclusions with the correct alternatives: another format goes to save_as/export_*, and copying an assembly with parts goes to pack_and_go_assembly. Prerequisites ('open, active document, already saved once unless you give a path') are stated outright.

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