draw_rectangle
Creates an axis-aligned rectangle as a closed LWPOLYLINE from two opposite corner coordinates, with optional line width, layer, and color for precise AutoCAD geometry.
Instructions
Draw an axis-aligned rectangle (as a closed LWPOLYLINE) from two opposite corners.
Args: corner1: First corner [x1, y1]. corner2: Opposite corner [x2, y2]. width: Optional line width. layer: Optional layer name. color: Optional ACI color (1-255).
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": {
"corner1": "<corner1>",
"corner2": "<corner2>"
},
"name": "draw_rectangle"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | ||
| layer | No | ||
| width | No | ||
| corner1 | Yes | ||
| corner2 | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |