Skip to main content
Glama
SolidWorks MCP Python

SolidWorks MCP Python

by locense

Add Sketch Relation

add_sketch_constraint

Adds geometric relations such as parallel, tangent, or coincident between sketch entities to lock in design intent and keep sketches defined.

Instructions

Add a geometric relation between sketch entities: horizontal, vertical, parallel, perpendicular, tangent, coincident, concentric, equal, symmetric, collinear or fix.

Use it to hold design intent, then check with check_sketch_fully_defined. Entities are the ids the add_* tools returned. Needs: an open sketch (create_sketch). Changes: adds the relation. Returns: constraint with id, type and the entities.

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

Input Schema

NameRequiredDescriptionDefault
input_dataYesThe relation. `entity1` and `relation_type` are required; `entity2` when the relation needs two, and `entity3` (the centreline) only for symmetric.

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 declare readOnlyHint=false, idempotentHint=false and destructiveHint=false, so the safety profile is covered. The description adds real context on top: an open sketch is required, the call mutates by adding a relation, and the result is a constraint object with id/type/entities. It does not explain what happens on duplicate or conflicting relations, which is the main remaining behavioral gap for a non-idempotent mutation.

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 relation vocabulary, then a compact Needs/Changes/Returns block, so every sentence carries information. The line-wrapped 'Entities are the ids...' sentence sits slightly awkwardly mid-block, but there is no filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers the prerequisite, the mutation effect and the returned shape (though an output schema exists, making the Returns line partly redundant), which is enough for a one-parameter wrapper. Missing are failure cases (conflicting or over-constraining relations) and per-relation entity arity beyond the symmetric note.

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 meaning the schema does not: entities are the ids returned by the add_* tools, which tells the agent where the values come from. It also restates the symmetric/entity3 rule, which the schema already covers, so the gain is modest rather than large.

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 ('Add a geometric relation between sketch entities') and enumerates the exact relation vocabulary (horizontal, vertical, parallel, perpendicular, tangent, coincident, concentric, equal, symmetric, collinear, fix). That enumeration separates it cleanly from nearby siblings such as add_sketch_dimension and the sketch_* pattern tools.

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 an explicit usage rationale ('hold design intent') and names the follow-up verification tool, check_sketch_fully_defined, plus the prerequisite create_sketch. It stops short of stating when NOT to use it — e.g. when a dimensional constraint (add_sketch_dimension) is the right choice instead of a relation.

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