Skip to main content
Glama

read_displacements

Read displacement grids from a .vmf to report grid power and size, vertex world positions, painted area, and seam cracks where terrain separates.

Instructions

Reads the displacements of a .vmf: the grids of vertices that replace a brush face and make every piece of terrain in Source. Until now this toolkit could only detect one -- read_vmf_solids has reported hasDisplacement since the beginning and nothing has ever read what was in it. Reports each grid's power and size, where it starts, how far the terrain moves, how much of it is painted, and the world position of every vertex. Positions rather than raw arrays, because every question worth asking about a displacement is a question about where its vertices are. Also finds seams: two vertices that share an undisplaced point and no longer share a displaced one, which is the crack a player falls through and which is invisible in the editor.

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": {
      "path": "<path>"
    },
    "name": "read_displacements"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the .vmf, absolute or relative to the repo root.
includeVerticesNoReturn every vertex. Off by default: a power-4 displacement has 289 of them and a hillside has dozens of displacements.

Output Schema

NameRequiredDescriptionDefault
pathYes
countYes
seamsYes
nextStepYes
warningsYes
displacementsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A4/5.0
Behavior4/5

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

Annotations carry only a title, so the description does the work: it discloses what is reported per grid (power, size, start point, displacement magnitude, painted fraction, vertex world positions) and adds a non-obvious derived analysis (seam detection). It does not discuss cost/limits beyond the vertex-count note in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Core purpose is front-loaded, but the middle of the description is narrative padding ('Until now this toolkit could only detect one', 'the crack a player falls through and which is invisible in the editor') that costs words without adding call-relevant information.

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

Completeness4/5

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

An output schema exists, so return values need not be enumerated, yet the description still usefully previews what the agent will get (per-grid stats, vertex positions, seams). For a two-parameter read tool this is close to complete; only cost/scale caveats are thin.

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% and the schema already explains path resolution and why includeVertices defaults off with the power-4 = 289 vertices rationale. The description's 'Positions rather than raw arrays' framing adds design rationale but no new parameter semantics, so baseline 3 applies.

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?

Opens with a specific verb+resource ('Reads the displacements of a .vmf') and immediately scopes what that means (vertex grids replacing brush faces). It explicitly distinguishes itself from read_vmf_solids, which it says only reports hasDisplacement, so an agent can separate the two without inspecting schemas.

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?

The contrast with read_vmf_solids ('has reported hasDisplacement ... and nothing has ever read what was in it') tells the agent when to reach for this tool instead. There is no explicit when-not guidance and the sibling sew_displacements is not addressed.

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