Skip to main content
Glama

run_map_test

Launches an installed Left 4 Dead 2 map, watches the console log for a regex pattern, then closes the game and returns the match, elapsed time, and log tail for automated play testing.

Instructions

Launches an installed map and watches the engine's console log for a pattern, then closes the game. This is the automated half of a play test: 'did the next chapter load', 'did the finale script run', 'did the map finish loading at all'. The map must already be installed in left4dead2/maps or a mounted add-on VPK. Returns the match, the elapsed time and the log tail; the full log stays at <game>/left4dead2/console.log.

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": {
      "map": "<map>",
      "waitFor": "<waitFor>"
    },
    "name": "run_map_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
mapYesMap name without a path or .bsp, for example hsmcp_test_m1.
confirmNo
waitForYesRegular expression to find in the console log, e.g. a map name or a banner.
extraArgsNoExtra game command-line arguments.
timeoutSecondsNo

Output Schema

NameRequiredDescriptionDefault
mapYes
reasonYes
logTailYes
matchedYes
elapsedSecondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.24-alpha

TDQS

A4.1/5.0
Behavior4/5

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

With only a title annotation, the description carries the behavioral burden and does well: it discloses that a game process is launched and then closed, and what the response contains (match, elapsed time, log tail) plus where the full log lives. It omits what happens when the pattern never matches — whether the timeout raises an error, returns a non-match, and whether the game is force-terminated.

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 action, then usage framing, then return information — no filler sentences. The return-value sentence partly duplicates the output schema, though the console.log path is information the schema does not carry.

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 tool that launches and kills a game process, the definition covers prerequisites, behavior, and return shape adequately, and an output schema exists so return values needn't be re-explained. The remaining hole is failure/timeout semantics and the undefined `confirm` flag, which an agent needs before invoking.

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 60%, and the description adds real meaning for the map parameter by stating the install-location precondition. However, `confirm`, `extraArgs`, and `timeoutSeconds` get no treatment in either schema or description — `confirm` in particular is entirely undefined, which is a meaningful gap for a tool that spawns a process.

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 chain and resource: launch an installed map, watch the engine console log for a pattern, close the game. That is unmistakably distinct from the read_map_*/run_compile siblings, and the parenthetical examples ('did the next chapter load', 'did the finale script run') pin down intent.

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?

Frames the tool as 'the automated half of a play test' and gives concrete conditions that select it, plus a prerequisite (map must already be installed in left4dead2/maps or a mounted add-on VPK). It never names an explicit alternative or exclusion, so it stops short of a 5.

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