Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Look Up API Method

lookup_api_method
Read-onlyIdempotent

Look up SolidWorks API methods and properties in the installed type library to verify parameters, return types, and descriptions before writing or debugging VBA, macro, or COM calls.

Instructions

Look up one SolidWorks API method or property: parameters, return type, description.

Use this before writing or debugging a SolidWorks API call (VBA, a macro or COM) to check that the member exists on that interface and how to call it. Answers come from the SolidWorks type library installed on this machine, so they match the installed version.

Setup: none. SolidWorks must be installed, not running; it is never contacted. Read-only. The first lookup builds the index (about a second). index_status is ready, rebuilt or unavailable.

Names match regardless of case, as COM does. result.member is SolidWorks' own spelling, with a note when yours differs. Each parameter has a type and a direction: in, out (SolidWorks fills it) or in_out (pass a variable by reference). return_type is null when the method returns nothing; a property has its value type there and an access. result.found false means there is no such member, and result.note says why, including when no index could be built (SolidWorks isn't installed here, or the requested year isn't).

Example input: {"interface": "ISldWorks", "method": "OpenDoc6"}

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

Input Schema

NameRequiredDescriptionDefault
input_dataNoThe member to look up. `interface` (e.g. "ISldWorks") and `method` (a method or property name) are required; `year` has a default.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/non-destructive annotations: it discloses that SolidWorks must be installed but is never contacted or required to be running, that the first call builds an index (~1 second), and that index_status can be ready/rebuilt/unavailable. It also explains the failure path (result.found false, result.note explaining missing install or year), which annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and usage are correctly front-loaded, but the middle section spends several sentences explaining result shape (result.member, parameter type/direction, return_type nullability, access) even though an output schema exists and covers these. That detail dilutes an otherwise tight definition.

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 single-parameter, read-only lookup, everything an agent needs is present: trigger context, setup prerequisites, index warm-up latency, case-matching behavior, and not-found semantics. The presence of an output schema means return values need not be documented here, so the remaining coverage is more than sufficient.

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 coverage is 100% and the schema already documents interface, method, year and index_file in detail, so the baseline is 3. The description adds the COM-style case-insensitive matching rule and an example input, but case-insensitivity is largely restated in the method field's own schema description, so the marginal gain is modest.

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 scope: "Look up one SolidWorks API method or property: parameters, return type, description." The singular "one ... member" scope cleanly separates it from interface-level or search-oriented siblings such as lookup_api_interface or find_related_api_members without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear use context: "Use this before writing or debugging a SolidWorks API call (VBA, a macro or COM) to check that the member exists on that interface and how to call it." That is an explicit trigger condition, but no exclusions or named alternatives (e.g., when to prefer the interface lookup or the related-members tool instead) are offered.

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