Skip to main content
Glama

create_rectangle

Draw a corner-defined rectangle on an active sketch by specifying two opposite points in millimeters. Returns the rectangle's width and height for verification.

Instructions

Draw a corner-defined rectangle on the active sketch.

Args: x1_mm, y1_mm: One corner of the rectangle in mm (sketch-local). x2_mm, y2_mm: The opposite corner.

The rectangle is added to whatever sketch was started by the most recent create_sketch() call. Returns the rectangle's geometric properties (width and height in mm) for the LLM to verify.

Example — 50mm × 30mm rectangle starting at the origin: create_rectangle(0, 0, 50, 30)

Caveat: requires an active sketch (create_sketch first).

Caveat (paramétrico): el croquis NO es paramétrico. modify_dimension NO puede redimensionar el ancho/alto post-hoc — solo la profundidad de extrusión es paramétrica. Para cambiar el tamaño del rectángulo, reconstruye desde una pieza nueva. [en: Sketch geometry has NO driving dimension — modify_dimension cannot resize the rectangle post-hoc; only extrude depth is parametric. To resize, rebuild from a fresh part.]

Related: build_rectangular_pocket (sketch + cut in one call when the intent is a rectangular pocket — most common autoparts use of this primitive).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x1_mmYes
x2_mmYes
y1_mmYes
y2_mmYes
Behavior4/5

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

No annotations provided, so description carries full burden. Describes that rectangle is added to most recent sketch, returns geometric properties, and includes caveats about non-parametric dimensions (modify_dimension cannot resize). Could be slightly more explicit about error behavior if no active sketch.

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?

Well-structured with sections (Args, Returns, Example, Caveats, Related). Concise but includes necessary details. Slightly verbose due to bilingual caveat, but still efficient.

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?

With no output schema, description mentions return of geometric properties (width and height). Covers prerequisites, usage, and limitations. Lacks exact return format but sufficient for agent understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but description fully explains parameters: two corner coordinates (x1_mm, y1_mm and x2_mm, y2_mm). Provides an example tying parameters to real-world usage, adding meaning beyond the 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 clearly states it draws a corner-defined rectangle on the active sketch, specifying the resource (rectangle) and action (create). It distinguishes from sibling tool 'build_rectangular_pocket' which combines sketch and cut.

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?

Explicitly mentions requirement for an active sketch via 'create_sketch first'. Provides related tool 'build_rectangular_pocket' as an alternative for rectangular pockets. Gives clear context for when to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielproxd2/MCP_CAD'

If you have feedback or need assistance with the MCP directory API, please join our Discord server