Skip to main content
Glama

write_vmf_solid

Creates box, wedge, cylinder, or convex brushes in a .vmf, splicing solids into the target block without disturbing existing content. Every brush is re-read and verified before the file is written.

Instructions

Creates brushes in a .vmf from a shape description: box, wedge (a ramp), cylinder (an n-sided prism), or convex for a hull given face by face. Chooses the planes, winds every face outward and derives the texture axes with vbsp's own base-axis table, so the texture does not come out stretched or rotated. Inserts by splicing at the end of the target block: nothing already in the file moves, comments and formatting included. Every solid it writes is passed straight back through read_vmf_solids before the file is touched, and the write is refused if any of them fails -- the writer goes volume to planes, the checker goes planes to volume, so neither can hide the other's sign error.

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>",
      "solids": "<solids>"
    },
    "name": "write_vmf_solid"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the .vmf, absolute or relative to the repo root.
backupNoCopy the file to <file>.bak before writing. Nothing is copied on a no-op.
dryRunNoCheck and report without writing. Every verification runs either way.
solidsYesShapes to create, in order.
confirmNoRequired (true) to run this tool: it writes or executes.
entityIdNoHammer id of a brush entity to add them to. Omit to add them to the world.
materialNoMaterial for every face. Default TOOLS/TOOLSNODRAW, which draws nothing.
materialsNoMaterial per role, for the common case a single string cannot express -- a floor whose top is tile and whose sides are nodraw. Roles are the same ones set_face_material's `facing` selects, cut at the same 45 degrees, so a ramp counts as what it is closer to being. Any role left out falls back to `material`.
textureScaleNoTexture scale on both axes. Default 0.25.
lightmapScaleNoLuxels per unit on every face. Default 16.

Output Schema

NameRequiredDescriptionDefault
pathYes
notesYes
targetYes
writtenYes
solidIdsYes
verifiedYes
warningsYes
backupPathYes
bytesAddedYes
solidsAfterYes
solidsBeforeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A3.9/5.0
Behavior5/5

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

Annotations carry only a title, so the description must and does disclose the real behavior: insertion by splicing at the end of the target block so existing content, comments and formatting are preserved, and a mandatory verification pass through read_vmf_solids that aborts the write on failure. It even explains why the check is trustworthy (writer goes volume-to-planes, checker planes-to-volume, so sign errors cannot be mutually hidden) — exactly the kind of detail an agent cannot get from structured fields.

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?

Four sentences, front-loaded with what is created, then the guarantees, then the validation rationale. Dense but every sentence carries information; the only waste is that the shape enumeration crowds out shapes that actually exist.

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?

For a 10-parameter, deeply nested, mutation-heavy tool with an output schema, this covers the things an agent cannot infer: preservation of surrounding file content, texture correctness, and refusal semantics on failed verification. It leaves material role assignment, entity targeting and scale defaults entirely to the schema, which is acceptable given 100% coverage.

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 description coverage is 100% with per-shape discriminated variants, enum descriptions and defaults, so the schema does the heavy lifting and baseline is 3. The description adds conceptual value about texture axis derivation and prism vs. inscribed-polygon semantics, but it never mentions the material roles, entityId targeting, or scale parameters, and its partial shape list works against the schema rather than with it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Creates brushes in a .vmf from a shape description') and explains the geometry work (plane choice, outward winding, texture axes from vbsp's base-axis table). However, the enumerated shape list ('box, wedge, cylinder, or convex') reads as exhaustive while the schema actually supports nine shapes including cone, stairs, arch, sphere and torus, so an agent skimming the description would underestimate the tool's capability.

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

Usage Guidelines3/5

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

Usage is implied by the shape-description framing and the guaranteed round-trip through read_vmf_solids, which tells the agent this is the safe way to author solids. But no sibling is named as an alternative (write_vmf for raw text, write_vmf_fitting for fitted geometry) and there is no explicit when-not-to-use guidance.

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