Skip to main content
Glama

read_fgd_class

Retrieve the exact FGD schema for any Left 4 Dead 2 entity class: keyvalues with types and defaults, inputs, and outputs. List classes by prefix to check what Hammer accepts before writing VMF.

Instructions

What the game's own FGD declares for an entity class: every keyvalue with its type and default, every input, every output. This is the schema Hammer enforces, so it answers 'does this class accept that key' without guessing from the wiki. Called with no classname it lists the classes, optionally filtered by prefix. Reads left4dead2.fgd from the game's own bin directory, not a generic multi-game database. Needs the Python sidecar and the Left 4 Dead 2 install; see health.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_fgd_class"
  }
}

Input Schema

NameRequiredDescriptionDefault
gameNoGame profile id. This fork supports only 'l4d2', which is also the default; any other id is refused rather than answered about the wrong game.
limitNo
prefixNoWhen listing: keep classes starting with this.
classnameNoExact class, e.g. logic_relay.

Output Schema

NameRequiredDescriptionDefault
typeNo
inputsNo
matchedNo
outputsNo
returnedNo
classnameNo
keyvaluesNo
classCountYes
classnamesNo
descriptionNo
toleratedHelpersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A4.1/5.0
Behavior3/5

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

Annotations carry only a title, so the description bears the burden and does well on environment constraints: it reads left4dead2.fgd from the game's own bin directory, needs the Python sidecar, needs the L4D2 install, and defers to health. It does not disclose what happens when a classname is not found or when the result set exceeds the default limit of 200, which matters for a listing call.

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 the payload contents, then the usage rationale, then the fallback listing mode, then environment requirements. Sentences are dense but each carries information; the only soft spot is that the environment requirements could be compressed into the pointer to health.

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 needn't be restated, and prerequisites are covered. The gap is the listing path: no mention of truncation or how the default limit of 200 affects a full class listing, which an agent needs to know before treating the list as exhaustive.

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 75%, and the description adds real meaning beyond it by explaining the interaction between classname and prefix (prefix applies 'when listing'), which the schema only hints at. The game parameter's refusal behavior is already in the schema; the limit parameter, however, is left wholly undocumented in both places.

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 specific verb and resource (reads the game's own FGD declarations for an entity class) and enumerates exactly what is returned: keyvalues with type and default, inputs, outputs. It explicitly separates itself from a generic multi-game database, so an agent can distinguish it from the other read_* tools at a glance.

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

Usage Guidelines4/5

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

Gives a concrete decision context ('does this class accept that key' rather than guessing from the wiki) and explains the two modes: with classname for a lookup, without classname to list, with prefix as a filter. It does not name a sibling as an alternative, but the wiki/generic-database contrast supplies the exclusion.

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