Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Save As Template

save_as_template
DestructiveIdempotent

Save the active part, assembly or drawing as a template so new documents start from it. Reuse prepared units, materials and custom properties in create_part, create_assembly or create_drawing.

Instructions

Save the active part, assembly or drawing as a template, so new documents start from it.

Use it after setting up a document once (units with set_units, a material, custom properties) to start the next one the same way: pass the template to create_part, create_assembly or create_drawing as template. A part saves as .prtdot, an assembly as .asmdot, a drawing as .drwdot. Give file_path, or name to save in SolidWorks' first template folder so it also shows in File > New. Afterwards SolidWorks has the template open in place of the document, as File > Save As does (a saved document's file is left as last saved); the reply's warning says so. Save from a part with no features when only its settings should carry over. The path is checked before SolidWorks is asked: the extension must match, the folder must exist, and a file already there is kept unless overwrite is on. Needs: an open, active document. Changes: writes the template. Returns: data with file_path, document_type, in_template_folder, template_folders and document_became_template.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYes`file_path` or `name` (one is required); `overwrite` is off.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that SolidWorks ends up with the template open in place of the document (File > Save As semantics), that the reply carries a `warning` about this, that the path is validated before SolidWorks is invoked (extension match, folder existence, existing-file protection unless `overwrite`), and that an open active document is required. These are exactly the non-obvious side effects an agent needs, and nothing conflicts with the destructiveHint/readOnlyHint declarations.

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 purpose, then usage, then behavior, then a compact 'Needs/Changes/Returns' block — a clean structure. It is dense with parentheticals and redundantly restates the return fields that the output schema already defines, which costs a little tightness.

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 nested input and an output schema, it covers prerequisites, side effects, validation order, failure/overwrite protection, and success signals. An agent has everything needed to invoke it correctly without guessing.

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 100%, so the baseline is 3; the description adds real meaning on top by explaining the consequence of `name` (saved into SolidWorks' first template folder so it appears under File > New) versus `file_path`, and by clarifying that `overwrite` is a pre-checked no-op guard. It does not add format/syntax detail beyond the schema's extension listing.

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 specific verb and resource ('Save the active part, assembly or drawing as a template') plus a concrete outcome ('new documents start from it') and the exact file extensions produced per document type. This distinguishes it clearly from siblings like save_as and save_file, which do not create template artifacts.

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 when-to-use context ('after setting up a document once ... with set_units, a material, custom properties') and names the downstream consumers (create_part / create_assembly / create_drawing via `template`). It also offers a decision rule ('Save from a part with no features when only its settings should carry over'). It stops short of an explicit when-not/alternative comparison against save_as or save_file.

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