Skip to main content
Glama

read_entity_report

Lists every entity and its keyvalues from a .vmf or .bsp, filtered by classname, targetname, or key presence, so mappers can find specific entities such as doors with spawnflags 512.

Instructions

Hammer's Entity Report: every entity with its keyvalues, filterable by classname, targetname or the presence of a key. Takes a .vmf or a compiled .bsp -- on a map with no source this is not a convenience, it is the only way to ask. read_vmf counts entities by classname and read_bsp_entities gives a histogram; neither answers 'which entity has spawnflags 512', which is the question the report exists for and how a mapper finds the one door of forty that was left locked. A compiled entity has no Hammer id and owns no solids inline, so id is null and solidCount is 0 there.

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

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the .vmf or .bsp, absolute or relative to the repo root.
limitNo
hasKeyNoOnly entities carrying this keyvalue.
keyValueNoWith hasKey: the exact value it must have.
classnameNoSubstring, case-insensitive.
targetnameNoSubstring, case-insensitive.

Output Schema

NameRequiredDescriptionDefault
pathYes
formatYes
matchedYes
entitiesYes
returnedYes
byClassnameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A4.5/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 does the work: it discloses that compiled entities have id null and solidCount 0, and that both .vmf and .bsp sources are accepted. It stops short of describing the limit/truncation behavior (default 200, cap 2000), which is material for a report tool.

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?

Front-loaded with purpose and a differentiating clause, then a dense comparison sentence. The 'not a convenience, it is the only way to ask' line is rhetorical padding, though it also carries real information about compiled maps.

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 no explanation, and the description still covers source types and the compiled-entity caveats an agent would otherwise misread. The one gap is truncation and default limit behavior for what is a potentially large report.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 83%, so baseline is 3; the description earns a bump by explaining that filtering is by classname, targetname, or the presence of a key, and the spawnflags-512 example gives concrete meaning to the hasKey/keyValue pairing. The limit parameter remains unaddressed beyond schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb and resource ('every entity with its keyvalues') plus its filter dimensions, and immediately separates it from read_vmf (counts by classname) and read_bsp_entities (histogram). An agent can pick it without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Names both alternatives and the exact question that selects this tool ('which entity has spawnflags 512'), and adds the condition under which it is the only option ('on a map with no source'). Explicit when-to-use and when-not-to-use guidance.

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