Skip to main content
Glama

sw_close

Destructive

Closes a SolidWorks document and blocks closing when unsaved changes exist unless discard_changes is set to true.

Instructions

Close a document. Refuses if it has unsaved changes unless discard_changes=true (the user is asked).

Input Schema

NameRequiredDescriptionDefault
docNoDocument title or path. Defaults to the active document.
discard_changesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

The description adds significant behavioral context beyond the 'destructiveHint: true' annotation by detailing the specific cause of potential failure (unsaved changes) and the mechanism to override that failure (discard_changes=true).

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 definition is highly efficient, using two clear sentences to convey the function, the failure mode, and the required override parameter.

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?

The description is contextually complete for this operation; it covers the primary action, the failure condition, and the required remediation/override, leaving no ambiguity in decision-making.

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?

Although schema coverage is only 50%, the description provides crucial semantic meaning for the 'discard_changes' parameter, explaining its functional role in bypassing the document state safety check. This makes up for the incomplete schema.

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?

The description clearly states the tool's function: to close a document. While simple, it provides enough context to distinguish it from tools like sw_save or sw_new_document by defining the action's immediate consequence regarding state.

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?

It explicitly defines the primary behavioral constraint: refusal due to unsaved changes. This tells the agent precisely when the default call will fail and when it must include the discard_changes parameter.

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