Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Create Sketch

create_sketch

Open a new sketch on a selected plane or flat face of the active part so you can draw lines, circles, and other sketch entities before extruding or cutting.

Instructions

Open a new sketch on a plane or a flat face of the active part, ready for lines, circles and other sketch entities.

Use it first in every feature: sketch, draw, exit_sketch, then create_extrusion or create_cut_extrude. Planes: Front, Top, Right (or XY, XZ, YZ), or a plane made by create_reference_plane. Or give face_point, a point in mm on a flat face of the body: the sketch opens on that face and moves with it when the model changes. Coordinates in the sketch are mm from the origin. Needs: an open part. Changes: adds a sketch and opens it for editing; give sketch_name and exit_sketch names it that when it closes it (SolidWorks won't rename an open sketch). Returns: sketch with name (the name in the feature tree now) and plane (or face_point), plus name_on_exit when you gave sketch_name. A face_point not on a flat face fails with invalid_input.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe sketch. Exactly one of `plane` and `face_point`; `sketch_name` names it.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, idempotentHint=false and destructiveHint=false; the description goes well beyond that by disclosing state changes (adds a sketch and opens it for editing), the naming quirk (SolidWorks won't rename an open sketch, so sketch_name is applied on exit), and the invalid_input failure for a face_point not on a flat face. This is exactly the kind of context annotations cannot carry.

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, then workflow, then options, then side effects and return shape — a sensible order. It is dense and one clause is garbled ('give sketch_name and exit_sketch names it that when it closes it'), but almost every sentence carries information an agent needs.

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?

Covers the prerequisite, the exact state change, naming behavior across the sketch lifecycle, the failure mode, and the returned payload even though an output schema exists. For a stateful modeling tool with a nested input object, nothing an agent needs to call it correctly 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 description coverage is 100% and the nested schema already documents plane, face_point and sketch_name, including the 'give this or that' exclusivity. The description restates the same plane names and the face_point-follows-the-face behavior, adding only the deferred-naming nuance, so the schema does most of the work; baseline 3 applies.

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 ('Open a new sketch on a plane or a flat face of the active part') and immediately scopes what it is for ('ready for lines, circles and other sketch entities'). It is clearly distinguishable from siblings like exit_sketch and create_extrusion, which it names as the next steps.

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 an explicit ordering rule ('Use it first in every feature: sketch, draw, exit_sketch, then create_extrusion or create_cut_extrude') and a decision rule for the two ways to place the sketch: named planes, create_reference_plane output, or a face_point on a flat face. Prerequisite ('Needs: an open part') and the failure condition are stated.

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