Skip to main content
Glama

Draw debug primitives

debug_draw

Draws 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

NameRequiredDescriptionDefault
durationNoLifetime in seconds of game time (default 10; 0 = until debug_clear).
instanceNoOptional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance.
primitivesYesShapes to draw (see the example).

Output Schema

NameRequiredDescriptionDefault
nextNo
noteNo
addedYes
activeYes
warningNo
next_callNo
answered_byNo
expire_in_sNo
truncated_noteNo
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations, it discloses accumulation across calls, expiry after `duration` seconds of game time with 0 meaning until debug_clear or the next map, visibility in screenshot/screenshot_from, and that nothing in the game itself changes. This is substantive context the openWorldHint/destructiveHint flags do not convey, though the result-shape mention partly duplicates the output schema.

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?

The constraints (client-only, map required) are front-loaded before the drawing details and lifecycle, and each sentence carries information. The embedded example is long but earns its place by showing multi-primitive payloads.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a full schema, existing annotations, and an output schema, the description supplies the remaining operational facts an agent needs: platform limitation, map prerequisite, lifetime semantics, and clearing path. Nothing required to invoke it correctly is missing.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3; the description adds meaning on top by clarifying that an arrow is a line with a head at `to` and that `duration` is measured in game time with 0 meaning persistent. The inline example payload further anchors how primitives combine, though it does not add syntax 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?

States a specific verb (draws) plus the resource (3D lines, arrows, wireframe boxes/spheres, text) and the realm (client, in the game world). The enumerated primitive types make it unmistakably distinct from siblings like debug_clear or screenshot.

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 says it is client-only and unsupported on srcds (a dedicated server has no client realm), requires a map to be loaded, and names debug_clear as the way to remove primitives early. That covers when it works, when it does not, and the alternative for removal.

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