Skip to main content
Glama

Surfaces crossed by a segment

trace_through
Read-only

Lists every solid a segment passes through, in order, with entry/exit surfaces, distances and thickness for sound propagation through walls and doors.

Instructions

Lists every solid the segment start->end goes through, in order, by repeated traces (FractionLeftSolid gives where each solid is left). Result: {surfaces: [{entry, entry_normal, entry_surface (same surface fields as trace: mat_name, surfaceprop, texture, entity), distance_from_start, exit, exit_normal, exit_surface, thickness (units), reaches_end_inside?}], count, total_thickness, distance (segment length), truncated}. A start point inside a solid gives a first entry with entry_surface null. Made for sound propagation through walls and doors. Example: {"start": [0, 0, 64], "end": [800, 0, 64]}. Needs a loaded map (map_load): the server and client realms do not exist at the main menu.

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": {
      "start": "<start>",
      "end": "<end>"
    },
    "name": "trace_through"
  }
}

Input Schema

NameRequiredDescriptionDefault
endYesEnd, [x, y, z] in Hammer units.
maskNoContent mask: MASK_SOLID (default), MASK_SHOT, MASK_SHOT_HULL, MASK_SOLID_BRUSHONLY, MASK_PLAYERSOLID, MASK_PLAYERSOLID_BRUSHONLY, MASK_NPCSOLID, MASK_WATER, MASK_VISIBLE, MASK_OPAQUE, MASK_ALL, or the number.
realmNoRealm (default server).
startYesStart, [x, y, z] in Hammer units.
filterNoEntity indexes the trace ignores (e.g. the player).
instanceNoOptional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance.
max_surfacesNoMax solids listed (default 32); truncated says if more remained.

Output Schema

NameRequiredDescriptionDefault
nextNo
noteNo
countYes
warningNo
distanceYes
surfacesYes
next_callNo
truncatedYes
answered_byNo
truncated_noteNo
total_thicknessYes
version_warningNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.7

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare a read-only, closed-world operation, so safety is covered. The description adds real behavior beyond that: truncation via max_surfaces, the 'entry_surface null' case when the start point is inside a solid, thickness accumulation, and the map-load gating. It stops short of stating ordering guarantees across realms or performance characteristics of repeated traces.

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?

Front-loaded with purpose, then result shape, edge case, use case, example, and prerequisite in a logical order. It is dense but nearly every clause carries information; the inline result-shape enumeration is somewhat long given an output schema exists.

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?

For a 7-parameter geometric trace with an output schema, the description still covers the prerequisite (loaded map), the multiplicity/truncation behavior, the degenerate start-inside-solid case, and a worked example. Nothing an agent needs to call it correctly is missing.

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

Parameters3/5

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

Schema coverage is 100%, so every parameter including mask values and realm default is already documented structurally, which sets the baseline at 3. The description adds a concrete coordinate example and clarifies units (Hammer) implicitly, but says nothing extra about mask, filter, or max_surfaces 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 and resource ('Lists every solid the segment start->end goes through, in order') and immediately distinguishes the mechanism from the sibling trace ('by repeated traces'). An agent can tell this apart from trace or sound_trace without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete usage context ('Made for sound propagation through walls and doors') and a hard prerequisite ('Needs a loaded map (map_load): the server and client realms do not exist at the main menu'). It does not explicitly say when to prefer single trace or sound_trace instead, so routing is implied rather than stated.

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