Draw debug primitives
debug_drawDraws 3D lines, arrows, wireframe boxes, spheres, and text in the game world for visual debugging; shapes appear on screen and in screenshots and expire after a set duration.
Instructions
Client only (unsupported on srcds: it draws in the client realm, a dedicated server has none). Draws 3D lines, arrows (a line with a head at to), wireframe boxes, wireframe spheres and text in the game world, in the client realm (a map must be loaded), visible on screen and in screenshot/screenshot_from. They add up across calls and expire after duration seconds of game time (0 = until debug_clear or the next map). Nothing changes in the game itself. Result: {added, active, expire_in_s}. Example: {"primitives": [{"type": "line", "from": [0, 0, 64], "to": [500, 0, 64], "color": [0, 255, 0]}, {"type": "sphere", "pos": [500, 0, 64], "radius": 16}, {"type": "box", "min": [-32, -32, 0], "max": [32, 32, 72]}, {"type": "text", "pos": [0, 0, 100], "text": "spawn"}], "duration": 30}.
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": {
"primitives": "<primitives>"
},
"name": "debug_draw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| duration | No | Lifetime in seconds of game time (default 10; 0 = until debug_clear). | |
| instance | No | Optional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance. | |
| primitives | Yes | Shapes to draw (see the example). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| note | No | ||
| added | Yes | ||
| active | Yes | ||
| warning | No | ||
| next_call | No | ||
| answered_by | No | ||
| expire_in_s | No | ||
| truncated_note | No | ||
| version_warning | No |