Skip to main content
Glama
FullyDefined – AI for SOLIDWORKS

FullyDefined – AI for SOLIDWORKS

draw_rectangle

Adds a rectangle to the active SOLIDWORKS sketch using two opposite corner coordinates, with optional units; horizontal and vertical relations are applied for a defined sketch.

Instructions

Add a rectangle in the open sketch between opposite corners (x1, y1) and (x2, y2). Horizontal and vertical relations are normally added to its sides; list_sketch_entities shows them. In a part its width and height become dimensions when the sketch is closed, unless set first.

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": {
      "x1": "<x1>",
      "y1": "<y1>",
      "x2": "<x2>",
      "y2": "<y2>"
    },
    "name": "draw_rectangle"
  }
}

Input Schema

NameRequiredDescriptionDefault
x1YesX of the first corner
x2YesX of the opposite corner
y1YesY of the first corner
y2YesY of the opposite corner
unitNomm, cm, m, inch or ft

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses the side effect that horizontal/vertical relations are normally added, and that width/height become dimensions when the sketch closes unless set first. That last detail is genuinely non-obvious and affects how an agent sequences calls. It omits return values and error behavior when no sketch is open, keeping it below 5.

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?

Three tight sentences, front-loaded with the action and geometry, followed by behavioral caveats. Every sentence carries information, though the phrase 'list_sketch_entities shows them' is slightly tangential to invoking this tool.

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?

For a mutation tool with no annotations and no output schema, the description covers the important implicit behaviors (auto-relations, auto-dimensions on close) that an agent needs to predict outcomes. Only the return value and failure modes remain unaddressed.

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 all five parameters, including unit, are already documented in the schema. The description only reinforces the 'opposite corners' framing without adding format, range, or unit defaults beyond what the schema provides.

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 rectangle in the open sketch') plus the geometric definition of the inputs as opposite corners. This is clearly distinguishable from draw_line, draw_polyline, and draw_circle just from the text.

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

Usage Guidelines3/5

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

The phrase 'in the open sketch' implies the prerequisite that a sketch must be active, and the mention of list_sketch_entities hints at a follow-up verification step. However, it never states when to prefer this over draw_polyline or draw_line, and gives no exclusion conditions.

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