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
| Name | Required | Description | Default |
|---|---|---|---|
| map | Yes | Map name without a path or .bsp, for example hsmcp_test_m1. | |
| confirm | No | ||
| waitFor | Yes | Regular expression to find in the console log, e.g. a map name or a banner. | |
| extraArgs | No | Extra game command-line arguments. | |
| timeoutSeconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| map | Yes | ||
| reason | Yes | ||
| logTail | Yes | ||
| matched | Yes | ||
| elapsedSeconds | Yes |