Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Rebuild SolidWorks API Index

discover_solidworks_docs
Idempotent

Rebuild the SolidWorks API index from the installed type library for a specific year, or save a copy of the index to another folder.

Instructions

Rebuild the SolidWorks API index on purpose. The lookups don't need it.

The lookup tools (lookup_api_method, lookup_api_interface, find_related_api_members, search_solidworks_api_help) build the index themselves on first use, so call this only to rebuild it, to read a specific SolidWorks year, or to save a copy elsewhere. It reads every interface in the installed SolidWorks type library (each member's parameters, return type and description), plus the VBA library references. SolidWorks must be installed, not running; it is never started or called. Changes: writes the index file, replacing the saved one.

Returns summary (interface, method and property counts), type_library (version, year and .tlb path), year and output_file, the saved index (megabytes, so it is not returned). Fails with a message naming the installed years when year isn't installed, or saying SolidWorks isn't installed here.

Example input: {"year": 2026}

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

Input Schema

NameRequiredDescriptionDefault
input_dataNoThe rebuild. Nothing is required: `year` defaults to the installed release, `output_dir` to the index folder, and `include_vba` to on.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false; the description adds real context on top: the tool reads the installed type library and VBA references, requires SolidWorks installed but not running, and replaces the saved index file. It also names the failure modes (year not installed, SolidWorks absent). Minor gap: it does not discuss cost or duration of a full rebuild.

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-loads the purpose and the 'you probably don't need this' verdict before the mechanics. Slightly verbose in the returns paragraph, but every sentence carries information an agent would otherwise have to guess.

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-required-parameter rebuild tool with an output schema, the description covers prerequisites, side effects, replacement semantics, failure messages and return shape. Nothing needed to invoke it correctly 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?

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: a non-default output_dir is only for keeping a copy since lookups read the default folder, and should be passed back as index_file. The example input also anchors the year parameter concretely.

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?

The description states a specific verb and resource ("Rebuild the SolidWorks API index") and immediately distinguishes it from the lookup family that builds the index implicitly. An agent can tell this apart from lookup_api_method or search_solidworks_api_help without opening any 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?

It explicitly says the lookup tools build the index on first use, so this should be called only to rebuild, to target a specific SolidWorks year, or to save a copy elsewhere. Both the default behavior and the three legitimate override conditions 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