Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Generate VBA: Macro Recorder

generate_vba_macro_recorder
Read-onlyIdempotent

Generates a VBA macro skeleton to fill in or instructions for starting and stopping SolidWorks' built-in macro recorder. Returns code text only; nothing runs in SolidWorks.

Instructions

Write a VBA starting point: a macro skeleton to fill in, or a note on starting and stopping SolidWorks' macro recorder.

Use "create_template" for an empty macro with the usual SolidWorks setup. Recording itself is done in SolidWorks (Tools > Macro > Record). The macro comes back as text for the SolidWorks VBA editor (Alt+F11); execute_macro runs only binary .swp files, so it can't run this directly. Read-only. Nothing runs in SolidWorks. Returns: vba_code, the parameters used and usage_instructions.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYesA mapping with `operation`: "start_recording" (the default), "stop_recording" or "create_template" (with `macro_name`). Any other operation is refused.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Adds real behavior beyond the readOnly/idempotent annotations: nothing executes inside SolidWorks, the output is text destined for the VBA editor (Alt+F11), and it cannot be run by execute_macro. The 'Read-only. Nothing runs in SolidWorks.' sentence partially restates readOnlyHint, which keeps this from a 5, but the surrounding context is genuinely additive.

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 deliverable, then alternatives, then constraints, with no filler sentences. Slightly dense packing of several ideas into semicolon-linked clauses costs it a point on readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the key pitfalls (recorder runs in SolidWorks, output is text not a runnable .swp) and names the return payload, even though an output schema exists. The refused-operation behavior is noted in the description, so an agent has what it needs; only minor detail such as format specifics of vba_code is absent.

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 input_data object already documents the operation values (start_recording default, stop_recording, create_template) and macro_name. The description mirrors rather than extends that, so the 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 concrete verb and artifact ('Write a VBA starting point: a macro skeleton to fill in, or a note on starting and stopping SolidWorks' macro recorder') and explicitly separates itself from create_template and execute_macro. An agent can tell exactly what it produces and what it does not.

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 routing: use create_template for an empty macro with the standard setup, and note that actual recording happens in SolidWorks via Tools > Macro > Record. It also rules out execute_macro as a follow-up because that tool needs binary .swp files, which is precisely the when-not guidance an agent needs.

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