Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Export DWG

export_dwg
DestructiveIdempotent

Exports the active SolidWorks drawing to a DWG file so AutoCAD users can open it; provide a .dwg file path, and the open document remains unchanged.

Instructions

Export the active document to DWG, like File > Save As with the DWG type.

Use it to hand a drawing to AutoCAD users. SolidWorks picks the format from the file's extension, so end file_path in .dwg. Needs: an open, active drawing. Changes: writes the file, creating its folder and replacing a file already there; the open document is unchanged. Returns: export with file_path and format.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input_data": "<input_data>"
    },
    "name": "export_dwg"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe export. `file_path` (ending in .dwg) is required; `format_type` is not needed: the file extension decides the format.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

The description goes well past the annotations: it explains that the tool writes a file, creates the containing folder, and replaces any existing file at that path, which clarifies exactly what destructiveHint=true means in practice. It also states the reassuring boundary that the open document itself is unchanged and gives the precondition of an open, active drawing. It does not cover permissions or failure modes, which keeps it from a 5.

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-loads the core action, then uses terse labeled fragments (Needs/Changes/Returns) so an agent can scan preconditions, side effects, and output in one pass. No sentence is filler.

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?

Even though an output schema exists, the description briefly names the return payload ('export' with file_path and format), and it covers preconditions, side effects, and the extension requirement. For a single-parameter mutation tool this leaves nothing an agent needs in order to call it correctly.

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 coverage is 100%, so the params are already documented, but the description adds the operationally important rule that SolidWorks infers the format from the extension, so file_path must end in .dwg. It also preempts the common mistake of supplying format_type by explaining it is unnecessary, which is genuine value beyond the schema text.

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 (export the active document to DWG) and anchors it with a concrete analogy to 'File > Save As with the DWG type.' The named format distinguishes it immediately from siblings such as export_pdf, export_step, and export_stl without any schema lookup.

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?

'Use it to hand a drawing to AutoCAD users' gives the agent a clear selection scenario for choosing DWG over the other export formats. It stops short of explicitly naming an alternative and saying when not to use this one, so it is clear context rather than full guidance.

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