Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Exit Sketch

exit_sketch
Idempotent

Closes the open sketch and exits editing so extrusion, revolve, or cut-extrude features can use it; returns the feature-tree sketch name and warns if the name is taken.

Instructions

Close the open sketch so a feature can use it.

Call it after drawing and before create_extrusion, create_revolve or create_cut_extrude; those use the sketch closed last. Needs: an open sketch. Changes: leaves sketch editing; the sketch stays in the feature tree, renamed to the sketch_name create_sketch was given. Returns: a message, plus, after a sketch_name, sketch with name (the name in the feature tree, which later tools take as sketch_name) and a warning when the name couldn't be given (another feature has it).

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and idempotentHint=true; the description adds the substantive state change (leaves sketch editing), the fact the sketch persists in the feature tree, the rename side effect to the name create_sketch supplied, and the failure mode where another feature already holds that name. It also discloses a warning field in the result, which the annotations cannot convey.

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?

Front-loaded with the core action; the 'Needs/Changes/Returns' labels make it scannable. The Returns sentence is partly redundant with the existing output schema, though it earns some of its length by explaining the warning condition.

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 zero-parameter state-transition tool this covers prerequisites, ordering relative to the three consumer tools, side effects, and the naming round-trip that later tools depend on. Nothing an agent needs in order to call it correctly or interpret the result is missing.

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?

The tool takes zero parameters, so the baseline is high. The description usefully clarifies that no sketch identifier is needed because the operation acts on the currently open sketch, which a bare empty schema would leave ambiguous.

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 (close) and resource (the open sketch) plus the reason it exists ('so a feature can use it'). An agent can distinguish it immediately from create_sketch and from the modeling siblings it names.

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?

Gives explicit ordering ('after drawing and before create_extrusion, create_revolve or create_cut_extrude') and explains the dependency ('those use the sketch closed last'), plus a hard prerequisite ('Needs: an open sketch'). This is exactly the when-to-use framing that prevents wrong tool selection.

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