Skip to main content
Glama

Read a file inside a map

read_member
Read-onlyIdempotent

Read a single file inside a Warcraft III map, returning parsed data for supported formats, text for scripts or text files, and size for other files without modifying the map.

Instructions

Read one file inside a map. For a format wc3files reads (war3map.w3i, w3e, doo, w3r, wts, wtg, wct, the object files and more) it returns the parsed data, for a script or text file its text, and for any other file only its size. Prefer the focused tools when they fit: map_info for war3map.w3i, object_data for the object files, trigger_text for war3map.wtg, check_script for the script and model_info for a model. A large result such as a whole terrain is refused past max_chars. 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>",
      "member": "<member>"
    },
    "name": "read_member"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe .w3x or .w3m map. 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.
memberYesThe file inside the map, as list_members names it, such as war3map.w3e, war3map.j or war3mapImported\Hero.mdx.
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. Changed4 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 / member / description
      Added value: +"The file inside the map, as list_members names it, such as war3map.w3e, war3map.j or war3mapImported\\Hero.mdx."
    • addedInput schema / properties / path / description
      Added value: +"The .w3x or .w3m map. 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 readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered; the description adds genuinely new behavior by disclosing the three different result shapes (parsed, text, size-only) and that oversized results are refused past max_chars. The closing sentence restating read-only and determinism is largely redundant with the annotations, which keeps this from 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.

Conciseness4/5

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

One dense paragraph that front-loads the purpose, then return shapes, then sibling routing, then limits — good ordering with no filler sentences. The final clause about read-only/determinism duplicates the annotations and could be dropped without loss.

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, so the description carries the burden of explaining return values and does so by classifying members into parsed / text / size-only. Combined with the limit behavior and sibling routing, an agent has everything needed to call it correctly without opening the schema.

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 the schema entries already explain path resolution, member naming with examples, and that max_chars causes refusal with a hint. The description's mention of a large terrain being refused past max_chars mostly restates that, adding illustration rather than new semantics, so 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?

The first sentence states a specific verb (read) and resource (one file inside a map), and the rest enumerates exactly what comes back for each class of member: parsed data, text, or size only. This is clearly distinguishable from siblings like list_members (which enumerates) and the focused parsers named later.

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?

It gives an explicit routing rule: prefer map_info for war3map.w3i, object_data for object files, trigger_text for war3map.wtg, check_script for scripts, and model_info for models, leaving read_member as the general fallback. When-to-use and when-to-prefer-an-alternative are both stated outright.

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