prompting-tutorials

A collection of tested prompting recipes for creating SolidWorks parts through an MCP server. MCP is a way for an AI assistant to call tools provided by another program.

In plain words
What is it for?
Use it to write prompts and tool-call sequences for sketches, extrusions, revolutions, dimensions, and other SolidWorks part-building steps.
Why use it?
It reduces failures caused by vague dimensions, incorrect plane names, or tool calls made in the wrong order.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/andrewbartels1/solidworksmcp-python/prompting-tutorials
Clone the repo
git clone --depth 1 https://github.com/andrewbartels1/SolidworksMCP-python
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,577 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.04577
Opus 5 $0.00000 $0.02289
Sonnet 5 $0.00000 $0.00915
Haiku 4.5 $0.00000 $0.00458

Measured yesterday against content hash 303607bc748a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompting-tutorials scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/prompting-tutorials.md · 448 lines

How it starts

The opening of the file, as written. The whole thing — 448 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prompting Tutorials

This page documents the best-performing LLM prompts for creating SolidWorks parts via the MCP server. Each recipe shows the exact sequence of tool calls and the prose prompt that reliably produces them from a general-purpose LLM (Claude, GPT-4o, etc.).


Standard Tool-Call Sequence

Every part creation follows the same six-step pipeline regardless of shape complexity:

Standard MCP tool-call sequence


Prompt Engineering Principles

1. Prefer specific geometry over adjectives

"Make a wide, flat part"
"Create a sketch rectangle x1=-50, y1=-25, x2=50, y2=25 then extrude 5 mm"

2. Use the correct plane names

SolidWorks default planes are exactly: "Front", "Top", "Right". Any variation ("XY", "front") will fail.

Reference planes coordinate diagram

3. Emit tool calls in dependency order

A create_extrusion will fail if the active sketch hasn't been closed with exit_sketch first.

Correct order:

create_sketch → add_geometry → exit_sketch → create_extrusion/revolve

4. Always specify mm not m

All SolidWorks API lengths are in metres by default. The MCP server converts values > 0.5 automatically (see input_compat.py), but the safest approach is to always check:

# 10 mm should be passed as 10.0 (server normalizes)
# 0.01 m is also accepted

5. Add set_dimension to parametrize your model

After creating features, lock dimensions symbolically so the model can be driven by parameters later:

set_dimension name="D1@Sketch1" value=50.0
set_dimension name="D1@Boss-Extrude1" value=10.0

6. Read before write on existing parts

When editing an existing file, first request model context so the LLM does not guess feature/config names.

Recommended read sequence:

open_model -> get_model_info -> list_configurations -> list_features

Use this as a preface in your prompt:

Read the full file on GitHub · 448 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 448 lines · 0 tokens per session scan A 303607bc748a

Subscribe to this mod's changes

prompting-tutorials is an agent published in the GitHub repository andrewbartels1/SolidworksMCP-python (65 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,577 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.