read_materials
Read a compiled BSP's material table to see every referenced texture and its exact TEXINFO reuse count, revealing which materials a map employs and which cover most surfaces.
Instructions
Material table of a compiled map: every texture referenced by a TEXINFO, and how many TEXINFO entries reuse it -- the only accurate reuse count in the file. Reads TEXDATA, TEXDATA_STRING_TABLE, TEXDATA_STRING_DATA and TEXINFO by offset, never the whole map. Answers which materials a map actually employs, and which carry the bulk of its surfaces.
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_materials"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .bsp, absolute or relative to the repo root. | |
| limit | No | ||
| sortBy | No | usage: most-referenced material first. name: alphabetical. | usage |
| nameContains | No | Case-insensitive substring filter on the material path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| returned | Yes | ||
| materials | Yes | ||
| texdataCount | Yes | ||
| texinfoCount | Yes | ||
| materialCount | Yes | Distinct material names, after filtering. | |
| unattributedTexinfo | Yes | TEXINFO entries whose texdata index is out of range -- normally zero. |