inspect_drawing
Queries read-only spatial data from CAD or DXF models, returning drawing extents, room schedules, point containment, geometric intersections, and nearest object snaps.
Instructions
Inspect spatial intelligence, dimensions, geometric intersections, and object snaps.
Behavior:
Mutation: Strictly read-only; does not modify drawing entities, layers, or CAD state.
Persistence: No persistent side effects or disk modifications.
Side Effects: Computes spatial relationships in-memory from active CAD or DXF model.
Usage Guidelines:
When to Use: Call whenever the AI needs spatial intelligence (drawing extents, room schedules, what entity is located at coordinate X,Y, line crossings, or nearest snap points).
Sibling Routing / Alternatives:
For launching an interactive graphical web viewer for human visual inspection, use
show_drawing_viewer.For computing area or measuring specific entity handles, use
manage_entities(operations="area|...").For requesting interactive human mouse clicks in the CAD viewport, use
prompt_user.
Modes & Parameters:
mode: Inspection mode ("summary", "point", "intersections", "snap"). Default: "summary".
"summary": Global bounding box, room schedule, layer inventory, and ASCII minimap.
"point": Point-in-polygon raycasting query ("what room/space contains point X,Y?"). Requires
point="x,y"."intersections": Detect geometric crossings between entities. Optional:
handle1,handle2,layer."snap": Object snap assistant. Finds closest endpoint, midpoint, or center to
point. Requirespoint="x,y".
point: Coordinates "x,y" or "x,y,z" (required for "point" and "snap" modes).
handle1: Optional first entity handle to restrict intersection checks.
handle2: Optional second entity handle to test intersection against handle1.
snap_types: Comma-separated snap filters: "endpoint", "midpoint", "center". Default: "endpoint,midpoint,center".
tolerance: Search radius for snap points in drawing units. Default: 1.5.
layer: Optional layer name to filter intersection candidates.
Returns: JSON string with mode-specific spatial data, coordinates, and matched entities.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | summary | |
| layer | No | ||
| point | No | ||
| handle1 | No | ||
| handle2 | No | ||
| tolerance | No | ||
| snap_types | No | endpoint,midpoint,center |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |