Skip to main content
Glama

read_lightmap_budget

Reads a compiled BSP to report total lightmap luxel count, face-size histogram, costliest faces, and luxels per lit surface unit, excluding sky, nodraw, and no-light faces so the total reflects real budget.

Instructions

Where a compiled map's lightmap resolution went. Reads FACES and TEXINFO by offset: the total luxel count, a histogram by face size, the costliest individual faces, and luxels per unit of lit surface area when computable. Faces that could never carry a lightmap -- sky, nodraw, SURF_NOLIGHT -- are excluded via TEXINFO's flags, so the total is a budget, not a headcount padded with faces that cost nothing.

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_lightmap_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the .bsp, absolute or relative to the repo root.
limitNoHow many of the costliest faces to list.

Output Schema

NameRequiredDescriptionDefault
pathYes
costliestYes
faceCountYes
totalLuxelsYes
distributionYes
facesWithLightmapYes
luxelsPerAreaUnitYestotalLuxels / summed face area, in Hammer units^2. Null when no lit face has area.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A3.7/5.0
Behavior4/5

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

The annotations carry only a title, so the description bears the full behavioral burden and does disclose real substance: which lump data it reads (FACES and TEXINFO by offset), what filtering it performs (sky, nodraw, SURF_NOLIGHT excluded via TEXINFO flags), and that some metrics are only available 'when computable'. It stops short of stating failure behavior for non-BSP or malformed inputs.

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?

Three sentences, front-loaded with the payoff ('where the lightmap resolution went') before the mechanics, and the exclusion sentence earns its place by explaining why the total is meaningful. Slightly dense with engine jargon ('by offset', 'SURF_NOLIGHT'), but nothing is wasted.

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 spelled out, and the description still covers data sources, what is counted versus excluded, and the computability caveat. Only error/edge handling for invalid or uncompiled inputs is left unaddressed, a minor gap for a read tool.

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%, so both path and limit are already documented in the schema, making 3 the baseline. The description's phrase 'the costliest individual faces' loosely ties the output list to the limit parameter, but adds no format or bounds detail beyond what the schema provides.

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?

The description uses a specific verb (reads) plus a named resource (FACES and TEXINFO lumps of a compiled .bsp) and states exactly what the result answers: where lightmap resolution went. It is clearly a read-only diagnostic, implicitly distinct from the sibling set_lightmap_scale, but it never names an alternative explicitly.

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 only implied: an agent can infer you call this on a compiled map to audit luxel cost. There is no explicit 'use this when...' statement, no note on prerequisites (e.g. must be a compiled .bsp rather than a .vmf), and no routing to read_materials or set_lightmap_scale for adjacent questions.

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