Skip to main content
Glama
solidworks-mcp

solidworks-mcp

close_document

Destructive

Closes a SolidWorks document by name, path, or the active one. Refuses unsaved changes unless you save or discard them.

Instructions

Closes a document (by title, file name or path; empty = the active one). With unsaved changes it refuses, unless save=True (saves over its own file first, which must be inside the projects folder) or discard_changes=True (the unsaved changes are LOST).

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": "close_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
saveNo
discard_changesNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

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 naming the exact failure mode (refuses on unsaved changes), the destructive consequence spelled out in caps ('the unsaved changes are LOST'), and a real precondition ('must be inside the projects folder'). That precondition and the refusal path are things the annotations (destructiveHint=true, readOnlyHint=false) cannot convey, which is precisely the value this dimension rewards.

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?

Two sentences, both front-loaded with the operative fact (what closes, then what blocks the close). No filler, no restatement of the tool name, and the parenthetical asides are used efficiently for the target-identification options and the destructive warning.

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 three-parameter mutation tool with an output schema already available, the description covers the target selection, default target, failure condition, both escape hatches, and the destructive outcome. The only unaddressed edge is passing save=True and discard_changes=True simultaneously, which is a minor omission against an otherwise complete behavioral picture.

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: 'name' is defined as title/filename/path with empty meaning the active document, 'save' means overwrite its own file first with a folder constraint, and 'discard_changes' means permanent loss. All three parameters gain semantics that the bare boolean/string types do not provide.

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 ('Closes a document') plus the three ways the target can be identified (title, file name, path) and the default ('empty = the active one'). The refusal-with-unsaved-changes behavior makes clear this removes a document from the open set rather than persisting it, which is the distinction an agent needs against save_document/activate_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?

Gives explicit conditional guidance: call it directly when the document is clean, otherwise the call refuses and you must pick save=True or discard_changes=True. What is missing is a routing hint against the sibling save_document tool — it never says when to use save=True here versus saving separately first, so the agent must infer that choice.

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