Skip to main content
Glama
SolidworksMCP-python

SolidworksMCP-python

Generate VBA: Extrusion

generate_vba_extrusion
Read-onlyIdempotent

Generates VBA macro text for SolidWorks extrusions with full options such as both directions, draft, thin wall, and end conditions when standard extrusion tools lack a needed setting.

Instructions

Write a VBA macro that makes an extrusion with the full FeatureExtrusion options: both directions, draft, thin wall, end conditions.

Use it when create_extrusion doesn't cover an option you need, or to hand the step to someone as a macro. 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_extrusion"
  }
}

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe extrusion. `depth` (mm) is required; everything else (`sketch_name`, draft, thin-wall and end-condition options) has a default.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.0
    • changedInput schema / properties / input_data / description
      Previous value: -"The input data value."New value: +"The extrusion. `depth` (mm) is required; everything else\n(`sketch_name`, draft, thin-wall and end-condition options) has a\ndefault."
  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?

Annotations already declare readOnlyHint/idempotent/non-destructive, and the description repeats 'Read-only. Nothing runs in SolidWorks' rather than adding to it. What it does add is genuinely new: the output is text for the VBA editor (Alt+F11), and execute_macro cannot consume it because it only runs binary .swp files.

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 purpose, then the alternative and the execution caveat, then the return fields. Four short sentences, all load-bearing except the 'Read-only. Nothing runs in SolidWorks.' pair, which duplicates the annotations.

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 code-generation tool with a fully described nested schema and an output schema, the description supplies the missing operational context: where the generated code goes, why it cannot be executed directly, and which return fields to expect. Nothing an agent needs in order to call or use the result 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%, so the nested input_data fields are already documented, and the description only names option categories (both directions, draft, thin wall, end conditions) at a high level. It adds no syntax, units, or interaction guidance beyond the schema, 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 specific verb and resource ('Write a VBA macro that makes an extrusion') plus the distinguishing scope ('full FeatureExtrusion options: both directions, draft, thin wall, end conditions'). It explicitly separates itself from create_extrusion, so an agent can pick between them 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?

Gives an explicit selection rule: use this when create_extrusion doesn't cover a needed option, or when the step must be handed off as a macro. It also names execute_macro and explains why that path won't work here (.swp binary vs text), which is exactly the alternative an agent would otherwise try.

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