read_vmf_lint
Checks a .vmf against the game FGD and compiler rules to find unknown classes, invalid targets, bad texture scales, displacement errors, and L4D2 campaign issues before a long compile fails.
Instructions
Checks a .vmf against the game's FGD and against what the compilers accept, before a compile that can take forty minutes to fail. Finds unknown classes and keyvalues, outputs aimed at nothing, inputs a target class does not answer to, texture scales that become 'Bad surface extents', displacements on brush entities (with the real brush id, which vbsp does not print), props standing below the floor they were placed on because their model's origin is at its centre, and counts that approach the compiler limits. Knows the entities the installed FGD declares, so a class the game has is not reported as unknown. L4D2 campaign rules are included: a non-L4D2 changelevel, a missing landmark or checkpoint door, and a Standard finale are reported. Needs the Python sidecar and the Left 4 Dead 2 install; see health.
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_vmf_lint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| game | No | Game profile id. This fork supports only 'l4d2', which is also the default; any other id is refused rather than answered about the wrong game. | |
| path | Yes | Path to the .vmf, absolute or relative to the repo root. | |
| rule | No | Keep only findings from this rule. | |
| limit | No | ||
| severity | No | Keep only findings at this severity. | |
| collapseInstances | No | Expand every func_instance first, the way vbsp does at compile time. A map using instances otherwise reads as one entity where there is a whole building: counts are far too low, and outputs crossing an instance look like they target nothing. Off by default because it changes every count and every targetname. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| game | Yes | ||
| path | Yes | ||
| total | Yes | ||
| byRule | Yes | ||
| counts | Yes | ||
| matched | Yes | ||
| findings | Yes | ||
| returned | Yes | ||
| instances | Yes | ||
| nearLimit | Yes | ||
| bySeverity | Yes | ||
| fgdsLoaded | Yes | ||
| toleratedHelpers | Yes |