Skip to main content
Glama
SolidworksMCP-python

SolidworksMCP-python

Export PDF

export_pdf
DestructiveIdempotent

Export the active SolidWorks drawing or document to a PDF file for sharing by providing a file path ending in .pdf; the open document remains unchanged.

Instructions

Write a PDF copy of the active document; it stays open on its own file.

Use it to share a drawing; generate_drawing_package (drawing toolset) already saves a PDF with the drawing it creates. SolidWorks picks the format from the file's extension, so end file_path in .pdf. Needs: an open, active drawing (a part or assembly gives a PDF of the view). 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_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe export. `file_path` (ending in .pdf) 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. Changed7 schema fields changedv2.0.0
    • changedInput schema / properties / input_data / description
      Previous value: -"The input data value."New value: +"The export. `file_path` (ending in .pdf) is required;\n`format_type` is not needed: the file extension decides the\nformat."
    • addedInput schema / properties / input_data / properties / format_type / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / input_data / properties / format_type / default
      Added value: +null
    • changedInput schema / properties / input_data / properties / format_type / description
      Previous value: -"Export format (step, iges, stl, pdf, dwg, jpg, png)"New value: +"Not needed: the file extension sets the format; defaults to the tool's own format"
    • removedInput schema / properties / input_data / properties / format_type / type
      Removed value: -"string"
    • removedInput schema / properties / input_data / properties / options
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Format-specific export options"
      -}
    • changedInput schema / properties / input_data / required
      Previous value: -[
      -  "file_path",
      -  "format_type"
      -]New value: +[
      +  "file_path"
      +]
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

The description explains exactly what the destructiveHint implies: the file is written, its folder is created, and a file already at that path is replaced, while the open document itself is untouched. That is genuine context beyond the annotation flags, though it doesn't mention overwrite-confirmation or failure modes when the path is unwritable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with the action and then organized into Needs / Changes / Returns, which is easy to scan. The wrapping causes some awkward line breaks and a stray parenthetical ("a part or assembly gives a PDF of the view"), but 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?

For a single-parameter export it covers prerequisites, side effects on disk, the guarantee that the source document is unchanged, and names the return fields (export, file_path, format), which matches the existing output schema. Nothing an agent needs to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both file_path and format_type are already documented in the schema, including the fact that format_type is unnecessary. The description's only addition is the .pdf extension convention, which duplicates the schema text; baseline 3 applies when the schema does the heavy lifting.

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 first sentence pairs a specific verb ("Write a PDF copy") with a precise resource and scope ("the active document"), and it explicitly distinguishes itself from generate_drawing_package, which already emits a PDF. An agent can route between the two exports without opening a schema.

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 gives a use case ("Use it to share a drawing") and names the alternative (generate_drawing_package in the drawing toolset) plus the condition that makes the alternative preferable. The prerequisite (an open, active drawing) is stated outright.

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