Skip to main content
Glama

save_active_document

Save the active SolidWorks document silently without dialog boxes. Returns file details and error status; works only for documents with an existing filename.

Instructions

Guardar el documento activo de SolidWorks (pieza, ensamble o dibujo).

Guarda en silencio (sin abrir cuadros de diálogo). Equivalente a Ctrl+S en SW. Solo funciona si el documento ya tiene un nombre de archivo asignado — para guardar una pieza recién creada usa save_as. [en: Save the currently active document silently (no UI dialogs). Equivalent to Ctrl+S. Only works if the document already has a filename — for a fresh, never-saved document use save_as.]

Returns a dict with:

  • name: document title

  • path: filesystem path of the saved document

  • saved: True if save succeeded

  • errors: bitmask of swFileSaveError_e codes (0 if none)

  • warnings: bitmask of swFileSaveWarning_e codes (0 if none)

Raises:

  • SolidWorksError if no document is active.

  • SolidWorksError if the active document has never been saved (no filename). The user must File → Save As in SW first to set a target filename — we don't pop dialogs from this tool. Or call save_as(path) below to set the filename programmatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Since no annotations are provided, the description fully discloses behavior: silent save (no UI dialogs), equivalent to Ctrl+S, required precondition (filename exists), return dict structure with specific fields, and exception types. No hidden behaviors.

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?

The description is well-structured and concise, using bullet points for the return dict and clear sections. Every sentence adds value. The bilingual content does not hinder clarity.

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?

Given the simple save operation, no output schema, and no annotations, the description covers all necessary context: purpose, behavior, return values, error conditions, and alternative tool. It is fully self-contained.

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?

The tool has zero parameters, so the input schema provides no semantic information. The description adds no parameter descriptions because none exist. With 0 parameters, baseline 4 is appropriate.

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?

Describes exactly what the tool does: save the active SolidWorks document silently. Clearly distinguishes from the sibling tool 'save_as' by specifying that this tool only works if the document already has a filename, while 'save_as' is for new documents.

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?

Explicitly states when to use (document must have a filename) and when not to use (fresh document), and provides a direct alternative: 'save_as'. Also explains error conditions when no document is active or unsaved.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielproxd2/MCP_CAD'

If you have feedback or need assistance with the MCP directory API, please join our Discord server