Skip to main content
Glama
NejcDvorsek

SolidWorks MCP

by NejcDvorsek

close_document

Closes an open SolidWorks part, assembly, or drawing by title, or the current document when no title is given. Optionally saves before closing; unsaved changes are discarded otherwise.

Instructions

Close one open document by its title (list_documents): a part, assembly or drawing.

Without a title it closes the current part or assembly. save=True saves it over its own file first; otherwise closing never asks and unsaved changes are lost (the result says discarded_changes). Parts that an open assembly loaded (visible false) close with that assembly and are refused here. With no title and no current document it closes SolidWorks' active one, but only when that has no unsaved changes.

Input Schema

NameRequiredDescriptionDefault
saveNo
titleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.16.3

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly: it discloses that unsaved changes are discarded unless save=True, that save=True overwrites the document's own file, that the result reports discarded_changes, and that certain loaded parts are refused. This is strong transparency for a destructive operation.

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 purpose and title-based behavior are front-loaded, followed by save semantics, refusal behavior, and fallback behavior. Every sentence adds necessary operational detail, and there is no redundant filler despite the number of edge cases covered.

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 two-parameter tool with no annotations or output schema, the description is complete enough to call correctly. It covers the optional title behavior, save behavior, refusal cases, fallback behavior, and even the result indicator for discarded changes.

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 must explain both parameters, and it does. It explains that title selects a specific open document and that omitting title targets the current part/assembly; it also explains that save=True saves over the original file first, while false means unsaved changes are lost.

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?

The description names a specific verb (close) and resource (one open document), and scopes it to parts, assemblies, or drawings. It also points to list_documents for obtaining titles, making the operation distinguishable from sibling tools such as save_document and open_document.

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?

It clearly states the two primary usage modes: close by title, or close the current part/assembly when title is omitted. It also states exclusions and fallback conditions, including that assembly-loaded parts are refused and that SolidWorks' active document is closed only when it has no unsaved changes. It does not explicitly compare against save_document as an alternative when saving is the goal, which keeps this from a 5.

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