Skip to main content
Glama

Check a script

check_script
Read-onlyIdempotent

Validates a Warcraft III map's JASS or Lua script against game natives and Blizzard functions, reporting unknown calls, argument errors, and line-specific findings to explain load failures.

Instructions

Check a map's JASS or Lua script against the game's natives and Blizzard functions, as wc3files jass --check does: calls to unknown functions, wrong argument counts, arguments of the wrong type and similar errors. It returns the counts by severity and each finding with its line. Use it to find why a map's script may fail to load; read_member on war3map.j gives the script text itself. Only reads: it changes no file, and the same call on the same file gives the same result.

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": {
      "path": "<path>"
    },
    "name": "check_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesA .w3x or .w3m map, whose war3map.j or war3map.lua is checked, or a .j or .lua script file. A path under the folders the server was started with (--root). A relative path is taken from the first of them; list_files gives full paths that can be passed as they are.
max_charsNoThe longest result, in characters of JSON, before the call is refused with a hint on how to ask for less. Default 200000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.6.2
    • addedInput schema / properties / max_chars / description
      Added value: +"The longest result, in characters of JSON, before the call is refused with a hint on how to ask for less. Default 200000."
    • addedInput schema / properties / max_chars / minimum
      Added value: +1
    • addedInput schema / properties / path / description
      Added value: +"A .w3x or .w3m map, whose war3map.j or war3map.lua is checked, or a .j or .lua script file. A path under the folders the server was started with (--root). A relative path is taken from the first of them; list_files gives full paths that can be passed as they are."
  2. First observedv0.6.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, and closed-world behavior, and the description reinforces rather than contradicts them. Beyond annotations it discloses the return shape — counts by severity plus per-finding line numbers — which matters because there is no output schema. The description does not cover cost or runtime on large maps, which is a minor gap.

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 is front-loaded in the first clause, and the diagnostic/alternative routing follows immediately. The closing sentence restates readOnlyHint and idempotentHint almost verbatim from the annotations, which is low-value but brief.

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 two-parameter read-only check with no output schema, the description gives what an agent needs: what is validated, what the result contains (severity counts and line-tagged findings), and where to get the input text. Only the max_chars refusal path and performance expectations are left to the schema alone.

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 100% and both parameters already carry detailed descriptions (accepted file types, root resolution, max_chars refusal behavior). The description body adds no parameter-level meaning beyond what the schema supplies, so the baseline 3 is appropriate.

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 — checking a map's JASS or Lua script against game natives and Blizzard functions — and enumerates the error classes it detects (unknown functions, wrong argument counts, wrong types). It also names the equivalent CLI invocation (`wc3files jass --check`), which pins down the exact semantics.

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?

Explicitly says to use it to diagnose why a map's script may fail to load, and routes the agent to the sibling that fetches the raw script text (`read_member` on war3map.j) rather than conflating the two. It lacks an explicit 'do not use for X' exclusion, but the intended situation is unambiguous.

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