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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .vmf, absolute or relative to the repo root. | |
| backup | No | Copy the file to <file>.bak before writing. Nothing is copied on a no-op. | |
| dryRun | No | Check and report without writing. Every verification runs either way. | |
| solids | Yes | Shapes to create, in order. | |
| confirm | No | Required (true) to run this tool: it writes or executes. | |
| entityId | No | Hammer id of a brush entity to add them to. Omit to add them to the world. | |
| material | No | Material for every face. Default TOOLS/TOOLSNODRAW, which draws nothing. | |
| materials | No | Material 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`. | |
| textureScale | No | Texture scale on both axes. Default 0.25. | |
| lightmapScale | No | Luxels per unit on every face. Default 16. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| notes | Yes | ||
| target | Yes | ||
| written | Yes | ||
| solidIds | Yes | ||
| verified | Yes | ||
| warnings | Yes | ||
| backupPath | Yes | ||
| bytesAdded | Yes | ||
| solidsAfter | Yes | ||
| solidsBefore | Yes |