Skip to main content
Glama

api_dump_script

Read-onlyIdempotent

Dump a War Selection Lua API tree to log.txt as WSDUMP lines for read-only inspection, then import the dump to explore modding APIs.

Instructions

Lua script for the in-game developer console / a dev-mode mod that dumps the root API tree into gen/log.txt as WSDUMP lines (read-only: indexes fields under pcall, never calls f_* functions). root: start path ('root', 'root.unitType[0]', 'root.session.visual'); space: 'gameplay' (gameplay mod root) or 'visual' (visual mod root). seeds=true embeds known names from the active index so removed names are detected even if the engine does not allow pairs(). compact=true returns one line for the console. Arrays are sampled (array_sample elements) and written as []. Then call import_api_dump.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNo
rootNoroot
depthNo
seedsNo
spaceNogameplay
autorunNo
compactNo
to_tableNo
max_nodesNo
array_sampleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds real behavioral detail beyond them: indexing under pcall, never invoking f_* functions, array sampling with [] notation, and seeds embedding known names to detect removed entries. It does not explain the script's execution path or how output reaches gen/log.txt, so it falls short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The information is front-loaded with the core effect first, but it is a dense run-on paragraph mixing parenthetical asides, semicolon clauses, and inline examples. It earns most of its length for a 10-param tool, but structure and scannability suffer.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 10 parameters, no output schema, and 0% schema coverage, the description does well on the switches it covers but omits five parameters and never clarifies what the tool actually returns (the script text) versus what it writes. Adequate for a first call but incomplete for confident use.

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 description coverage is 0%, so the description must carry all parameter meaning, and it only explains 5 of 10 params (root, space, seeds, compact, array_sample). `depth`, `max_nodes`, `raw`, `autorun`, and `to_table` are undocumented anywhere, leaving half the surface opaque.

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

Purpose4/5

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

The description names a specific artifact (a Lua script for the dev console/dev-mode mod) and its concrete effect (dumping the `root` API tree into gen/log.txt as WSDUMP lines). It also names the sibling it feeds into ('Then call import_api_dump'), so an agent can place it in the workflow. The verb is partly implied by the tool name rather than stated outright, keeping it short of a 5.

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

Usage Guidelines3/5

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

The description supplies a clear next step ('Then call import_api_dump') and explains the `root`/`space`/`seeds`/`compact` switches, which implies when each is useful. However, it never says when to reach for this tool versus alternatives like search_api, api_index_status, or read_log, so selection guidance is left to inference.

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