Skip to main content
Glama

read_game_content

Searches installed L4D2 content for materials, models, and particles by name or glob, returning canonical names for mapping tools and optionally validating referenced textures or model bounds.

Instructions

Searches the game's installed content for materials and models, by name. This is Hammer's texture browser and model browser, which an agent otherwise does not have: without it a material is named from memory, and vbsp resolves a name literally, so a wrong one is a purple checkerboard nobody sees until a player loads the map. Returns material names in the form a .vmf stores -- uppercase, no materials/ prefix, no .vmt suffix -- which is exactly what set_face_material takes. A pattern with * or ? is a glob; anything else is a substring. Mounts the same VPK-and-loose chain the engine reads through, so this and read_map_dependencies cannot disagree about what exists. A .vmt being present is NOT the same as the material drawing: a material can name a texture this install does not have, which is the same purple checkerboard by another route. Pass details to resolve every texture a material names, or to read a model's hull bounds -- the size Hammer's model viewer shows and the number needed before placing a house on the floor. Needs the Python sidecar; see health.

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": {
      "pattern": "<pattern>"
    },
    "name": "read_game_content"
  }
}

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.
kindNoMaterials (.vmt), models (.mdl) or particle systems (.pcf).material
limitNo
detailsNoRead the .vmt of each result for its shader, its surface property, and whether every texture it names actually exists in this install. Off by default: a Garry's Mod install holds tens of thousands, and parsing them all to answer one search would cost seconds.
patternYesName to look for. 'brick' matches anything containing it; 'brick*' is a glob.

Output Schema

NameRequiredDescriptionDefault
gameYes
kindYes
noteNo
shownNo
totalYes
gameDirYes
mountedYes
patternYes
refusedNo
resultsYes
truncatedNo
mountErrorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A4.5/5.0
Behavior5/5

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

Annotations supply only a title, so the description carries the full burden and does: it discloses the exact return casing/prefix/suffix convention, glob vs substring pattern semantics, the VPK mount chain, the cost of details (parsing tens of thousands of files), the Python sidecar dependency, and the non-obvious caveat that a present .vmt does not guarantee the material renders. That last point is behavior an agent could not infer from any structured field.

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?

Purpose and the purple-checkerboard rationale are front-loaded, and every sentence carries a distinct fact (naming format, glob syntax, VPK consistency, details cost, sidecar). It is dense and long for a search tool, and the warning framing is repeated twice, but nothing is filler.

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?

For a five-parameter tool with an output schema and only nominal annotations, the description covers purpose, return value format, cost tradeoffs, dependency requirements, and known pitfalls about as well as a paragraph can. The one omission is what happens when limit truncates results, which the output schema may or may not resolve.

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 already 80%, so the schema documents pattern, kind, game, and limit on its own. The description adds meaning beyond that for details by explaining it resolves every texture a material names and reads model hull bounds ('the size Hammer's model viewer shows'), and it reinforces glob-vs-substring for pattern. It does not mention the limit/pagination behavior, which is the remaining gap.

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?

The description opens with a concrete verb and resource ('Searches the game's installed content for materials and models, by name') and then positions itself against sibling tools by describing the specific browser it emulates and the failure mode it prevents. An agent can tell this apart from read_materials, read_model_info, or read_pakfile without inspecting any schema.

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?

It gives clear usage context: use this rather than naming a material from memory, and it explicitly chains forward to set_face_material by guaranteeing the returned name form is what that tool accepts. It also states that results are consistent with read_map_dependencies because both read the same VPK-and-loose chain. It stops short of explicit exclusions ('use read_materials instead when...'), so it is strong but not a full when/when-not map.

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