Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Get Selected Entities

get_selected_entities
Read-onlyIdempotent

Reads and describes the faces, edges, and vertices currently selected in the SolidWorks window, returning each entity's type, index, and geometry data so you can act on the user's actual selection.

Instructions

Describe the faces, edges and vertices selected in the SolidWorks window right now.

Use it when the user has clicked something and says "this face": it reads the selection instead of guessing from a screenshot. To select edges yourself, use select_face_edges. Needs: an open document. Read-only. Returns: entities (each with index and type; a face adds bounding_box_mm, center_mm, area_mm2 and normal when flat, an edge start_mm, end_mm and straight-line length_mm, a vertex point_mm) and count.

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_selected_entities"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

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, idempotentHint and destructiveHint=false, and the description still adds real context: the 'Needs: an open document' prerequisite and the key behavior that it reads live selection rather than inferring from a screenshot. The remaining text walks through the return payload, which largely duplicates the output schema, so it adds less beyond the annotations than it could.

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 and the trigger, then prerequisite, then returns — a sensible ordering with no filler sentences. The per-entity-type field enumeration is longer than necessary given an output schema exists, but it is compactly packaged.

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-parameter, read-only tool with an output schema, the description covers everything an agent needs: what is read, the required document state, sibling routing for the adjacent capability, and the payload's top-level shape. Nothing material is left to inference.

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?

There are zero parameters, so the baseline is 4; the description correctly implies the only input is ambient (the current selection in the active window) and adds no misleading parameter claims. It makes the implicit-input model explicit, which is a small plus over an empty schema.

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 opens with a specific verb and resource: 'Describe the faces, edges and vertices selected in the SolidWorks window right now.' The scope ('right now', i.e. the live selection) immediately distinguishes it from tools that accept explicit geometry targets, so an agent need not open the 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 gives an explicit trigger — the user clicked something and says 'this face' — plus a named alternative (`select_face_edges`) for the case where the agent needs to pick edges itself. The when-to-use, when-not-to-use, and prerequisite (an open document) are all 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