drawing
Create, list, update, delete, or batch create shapes and text labels for network topology diagrams in GNS3 projects.
Instructions
Manage drawings (CRUD operations)
v0.47.0: CRUD-style consolidation of create_drawing, update_drawing, delete_drawing, and create_drawings_batch.
Actions: - list: List all drawings in a project - create: Create new drawing (rectangle, ellipse, line, text) - update: Update existing drawing properties - delete: Delete drawing (WARNING: destructive, cannot be undone) - batch: Create multiple drawings with two-phase validation
Returns: JSON with drawing info or batch operation results
Examples: # List drawings >>> drawing(action="list", project_id="abc-123") >>> drawing(action="list", project_id="abc-123", format="json")
# Create rectangle
>>> drawing(action="create", drawing_type="rectangle", x=100, y=100, width=200, height=100)
# Create text label
>>> drawing(action="create", drawing_type="text", x=175, y=140, text="Router1", z=1)
# Update drawing position
>>> drawing(action="update", drawing_id="abc123", x=200, y=200)
# Delete drawing
>>> drawing(action="delete", drawing_id="abc123")
# Create multiple drawings
>>> drawing(action="batch", drawings=[
... {"drawing_type": "rectangle", "x": 100, "y": 100, "width": 200, "height": 100},
... {"drawing_type": "text", "x": 175, "y": 140, "text": "Router1", "z": 1}
... ])Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | X coordinate (start point for line, top-left for others) | |
| y | No | Y coordinate (start point for line, top-left for others) | |
| z | No | Z-order/layer (default: 0 for shapes, 1 for text) | |
| rx | No | Horizontal corner radius (rectangle only) | |
| ry | No | Vertical corner radius (rectangle only) | |
| x2 | No | End X coordinate (line only) | |
| y2 | No | End Y coordinate (line only) | |
| svg | No | SVG content (for 'update') | |
| text | No | Text content (text only) | |
| color | No | Text color hex code (text only) | #000000 |
| width | No | Width in pixels (rectangle/ellipse only) | |
| action | Yes | Action: 'list' (list drawings), 'create' (new drawing), 'update' (modify), 'delete' (remove), or 'batch' (create multiple) | |
| format | No | Output format: 'table' (default) or 'json' (for 'list') | table |
| height | No | Height in pixels (rectangle/ellipse only) | |
| locked | No | Lock/unlock drawing (for 'update') | |
| drawings | No | List of drawing definitions (required for 'batch') | |
| rotation | No | Rotation angle in degrees (for 'update') | |
| font_size | No | Font size in points (text only) | |
| drawing_id | No | Drawing ID (required for 'update' and 'delete') | |
| fill_color | No | Fill color hex code | #ffffff |
| project_id | No | Project ID (required for 'list') | |
| font_family | No | Font family name (text only) | TypeWriter |
| font_weight | No | Font weight: 'normal' or 'bold' (text only) | normal |
| border_color | No | Border color hex code | #000000 |
| border_width | No | Border width in pixels | |
| drawing_type | No | Shape type for 'create': 'rectangle' (box), 'ellipse' (circle/oval), 'line' (connector), 'text' (label) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |