Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Add Sketch Polygon

add_polygon

Draw a regular polygon in an open sketch from its center, radius, and side count to create nuts, hex bosses, or pockets.

Instructions

Draw a regular polygon (e.g. a hexagon) in the open sketch from its centre, radius and number of sides.

Use it for nuts, hex bosses and pockets. Needs: an open sketch (create_sketch). Changes: adds the polygon's sides. Returns: polygon with id, center, radius, sides and angle. A diameter dimension (add_sketch_dimension) on its id sizes it by the circle drawn inside it.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYesA mapping: `center_x`, `center_y` (mm, default 0), `radius` (mm, circumscribed, default 10), `sides` (default 6) and `angle` (degrees the first corner is turned from +x, default 0).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already mark this as a non-destructive, non-idempotent mutation, and the description goes further by naming the prerequisite state (open sketch) and precisely what mutates ('adds the polygon's sides'). It does not say what happens if no sketch is open or whether the polygon is one entity versus loose lines, leaving a small behavioral gap.

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

Conciseness5/5

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

Front-loaded with the action, then compactly labelled 'Needs / Changes / Returns' clauses. Every sentence carries information — prerequisite, mutation effect, return shape, and the dimension coupling — with no filler.

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?

Covers the prerequisite, the mutation, the returned fields and how a downstream diameter dimension interacts with the result, which is more than enough for a single nested-parameter creation tool. Since an output schema exists, the brief return-field mention is a bonus rather than a necessity.

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 schema already documents center_x/center_y, circumscribed radius, sides default and angle. The description restates the same three inputs and adds only the notion of 'circumscribed' radius and the first-corner angle semantics, which the schema largely covers already.

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 ('Draw a regular polygon ... in the open sketch') plus the defining geometry inputs (centre, radius, sides), which is exactly what separates it from siblings like add_circle or add_line. The example ('e.g. a hexagon') and the use cases make the intent unmistakable.

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?

Names concrete usage contexts (nuts, hex bosses, pockets) and an explicit prerequisite ('Needs: an open sketch (`create_sketch`)'), and points to `add_sketch_dimension` for the sizing follow-up. It stops short of stating when NOT to use it, e.g. an irregular polygon versus add_line, so it is clear but not exclusionary.

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