Skip to main content
Glama

Trigger text

trigger_text
Read-onlyIdempotent

Reads a Warcraft III map's GUI triggers as World Editor lines for each event, condition, and action, so you can explain what the map's triggers do.

Instructions

Read a map's GUI triggers as the World Editor shows them, one line per event, condition and action. Use it to explain what a map's triggers do. A large map's triggers run to hundreds of thousands of characters: start with names_only, then pass name. Triggers written as custom text are in the script; check_script or read_member on war3map.j reads them. 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": "trigger_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoKeep only the triggers whose name contains this text, ignoring case. Empty keeps all.
pathYesA .w3x or .w3m map, or a war3map.wtg 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.
names_onlyNoReturn only the trigger names. Use it first on a large map, then ask for single triggers by name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 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 / name / description
      Added value: +"Keep only the triggers whose name contains this text, ignoring case. Empty keeps all."
    • addedInput schema / properties / names_only / description
      Added value: +"Return only the trigger names. Use it first on a large map, then ask for single triggers by name."
    • addedInput schema / properties / path / description
      Added value: +"A .w3x or .w3m map, or a war3map.wtg 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.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, and the closing sentence largely restates that, which is redundant. The description does add real value beyond annotations: the human-readable output format, the fact that large maps produce hundreds of thousands of characters, and that exceeding max_chars causes a refusal with a hint rather than truncation.

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?

The lead sentence establishes purpose and output format immediately, and the large-map workflow follows in a logical order. The final idempotence sentence duplicates the annotations and could be dropped without losing information, which keeps it from a 5.

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

Completeness5/5

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

There is no output schema, and the description compensates by describing the return format line-by-line, the size ceiling behavior, and where the data it does not cover can be found. For a read tool of this complexity, nothing an agent needs to invoke it correctly is missing.

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 100%, so all four parameters are already documented in the schema, including names_only's recommended-first use. The description's guidance on names_only and name mirrors the schema and adds no new semantics such as name-matching rules or max_chars tuning advice, so the baseline 3 applies.

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 concrete verb and resource ("Read a map's GUI triggers as the World Editor shows them") with the output shape (one line per event, condition, action). It also distinguishes itself from the script-reading siblings by noting that custom-text triggers live in war3map.j and are reached via check_script or read_member.

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

Usage Guidelines5/5

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

Gives explicit usage ("Use it to explain what a map's triggers do"), a concrete workflow for large inputs (start with names_only, then pass name), and names the alternative tools plus the condition that selects them for custom-text triggers. When-to-use and when-not-to-use are both covered.

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