Skip to main content
Glama
solidworks-mcp

solidworks-mcp

save_document

DestructiveIdempotent

Saves the active SolidWorks document or exports it to a specified file format, with overwrite control and optional versioned saving that preserves the previous file.

Instructions

Saves the active document. With 'path' (e.g. C:\projects\part.SLDPRT, .step, .stl, .pdf...) saves/exports to that file: the format is taken from the extension. When the user has set a projects folder, relative paths are confined to it and missing folders inside it are created. If the target file already exists, overwrite must be True or the save is rejected. new_version=True (no path) saves the document as the next version next to its current file (bracket_v1_base.SLDPRT -> bracket_v2_base.SLDPRT), never overwriting: the open document then becomes the new file and the previous version is kept unchanged. Without path or new_version, the document's own file is overwritten.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "save_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
overwriteNo
new_versionNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / new_version
      Added value: +{
      +  "default": false,
      +  "title": "New Version",
      +  "type": "boolean"
      +}
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (destructive=true), the description discloses what actually happens to data: overwrite is rejected unless overwrite=True, missing folders are created, bracketed version numbers are incremented, the previous version is preserved, and the open document rebinds to the new file. That is exactly the mutating-behavior detail an agent needs before calling.

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 with the core action, then organized by mode, with examples in parentheses that carry real information rather than filler. No sentence is redundant with the schema or annotations.

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?

An output schema exists and annotations cover the safety profile, so the description is close to complete. Minor gaps remain around failure modes such as unsupported extensions or read-only documents, but all three parameters and all three modes are fully specified.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden, and it does: 'path' is explained via extension-driven format selection and relative-path confinement, 'overwrite' via the rejection rule, and 'new_version' via a concrete rename example and the no-path requirement. It also implies defaults by explaining what happens with neither flag set.

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 ('Saves the active document') and then enumerates the three distinct save modes with concrete examples of path formats. The only shortfall is that it never distinguishes itself from the sibling export_document, which the phrase 'saves/exports' partially overlaps.

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 conditions for each mode: use 'path' to save or export elsewhere, new_version to bump a version in place, and no arguments to overwrite the current file. It also states the overwrite prerequisite and how relative paths behave under a projects folder, but names no alternatives when this tool is the wrong choice.

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