Skip to main content
Glama

read_bsp_entities

Reads entity data from a compiled .bsp lump 0 and returns a classname histogram plus filtered, paginated entities for inspecting map contents.

Instructions

Entities of a compiled .bsp, read from lump 0. Returns a classname histogram plus a filtered, paginated entity list. Seeks straight to the lump -- on a 1 GB map this reads about 1.5 MB. Note that a compiled lump has no Hammer ids; entities are keyed by index.

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

Input Schema

NameRequiredDescriptionDefault
nearNoCentre of a radius search, as [x, y, z].
pathYesPath to the .bsp, absolute or relative to the repo root.
limitNo
offsetNo
radiusNoRadius for `near` (default 512).
classnameNoExact classname match.
targetnameNoExact targetname match.
histogramOnlyNoReturn only the classname histogram and counts.
classnameContainsNoSubstring match on classname.

Output Schema

NameRequiredDescriptionDefault
pathYes
totalYes
matchedYes
entitiesNo
returnedNo
histogramYes
lumpBytesYes
truncatedNo
mapRevisionYes
nulTerminatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A3.8/5.0
Behavior4/5

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

Annotations carry only a title, so the description bears the disclosure burden and does reasonably well: it states the return shape (histogram plus filtered, paginated list), the access pattern (seeks straight to the lump, ~1.5 MB read on a 1 GB map), and a non-obvious caveat that compiled lumps have no Hammer ids and entities are keyed by index. It never states read-only safety or error behavior for a bad path, which keeps it below a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with what the tool returns, followed by cost and the id caveat. No filler; the performance figure and the Hammer-id note both carry information an agent would otherwise lack.

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?

With 9 parameters, an output schema already covering return values, and only a title in annotations, the description supplies the important context: lump-level read, histogram option, and index-based keying. The remaining gap is guidance on how filters combine (near/radius with classname) and confirmation that the operation is non-mutating.

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 78%, just under the threshold where the schema alone would justify a 3, and the description only gestures at the filter and pagination surface ('filtered, paginated entity list'). The 'keyed by index' note does add real meaning for offset/limit interpretation, but the near/radius spatial search, classnameContains, and histogramOnly parameters get no treatment in prose.

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 gives a specific verb and resource: entities of a compiled .bsp, read from lump 0, returned as a histogram plus a paginated list. That is far more precise than the bare name and implicitly separates it from the VMF-side readers, but it never names a sibling such as read_entity_report or read_vmf to make the boundary explicit.

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 this is the tool for entity data in a compiled map rather than a .vmf source. There is no explicit when-to-use/when-not statement and no routing to read_entity_report, read_vmf, or read_fgd_class when those might be better choices.

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