Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Get API Enum

get_api_enum
Read-onlyIdempotent

Look up SolidWorks API enum members and their integer values when a call requires an enum, such as a unit system or user preference, instead of guessing the number. Accepts an enum or member name, case-insensitive.

Instructions

Look up a SolidWorks API enum's members and their integer values.

Use this when a call takes an enum value, such as a unit system or a user preference, instead of guessing the number: the values aren't in the API help pages. Give the enum (swUnitSystem_e) or one of its members (swUnitSystem_IPS); a member's name returns its whole enum with matched_member set. Names match regardless of case. The values come from SolidWorks' constants type library installed on this machine.

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

Returns result with enum, description and members (name and value in declaration order). result.found false means there's no such enum or member, or no index could be built; result.note says which.

Example input: {"name": "swUnitSystem_e"}

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

Input Schema

NameRequiredDescriptionDefault
input_dataNoThe enum. `name` (an enum or member name) is 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.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses that SolidWorks must be installed but is never contacted, that the first lookup builds an index (~1s) and later ones reuse it, and it enumerates index_status values (ready/rebuilt/unavailable). It also explains the failure surface: result.found false plus result.note telling why. This is rich behavioral context annotations alone 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.

Conciseness4/5

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

Content is front-loaded with purpose, then usage, then setup/behavior, then return shape, then an example — a sensible ordering. It is somewhat long and restates return structure that the output schema already carries, which is the main thing keeping it from a 5.

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 lookup tool with a rich output schema and full annotations, nothing an agent needs is missing: inputs accepted, index build cost, failure modes, and status values are all covered. Return-value detail is appropriately delegated to the output schema.

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 parameters are already documented; the description still adds meaning by explaining that passing a member name returns the entire enum with matched_member set and that matching is case-insensitive. The rarely-used year and index_file parameters are left to the schema, which is acceptable given their coverage.

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 opening sentence gives a specific verb and resource: look up a SolidWorks API enum's members and their integer values. It is clearly distinct from sibling tools like lookup_api_interface or search_solidworks_api_help, which deal with interfaces/methods and docs rather than constant type libraries.

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 states the triggering condition explicitly ('Use this when a call takes an enum value... instead of guessing the number') and justifies itself against the alternative of reading API help pages ('the values aren't in the API help pages'). It also explains the two acceptable input modes (enum name or member name) and the resulting behavior, leaving little to inference.

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