Skip to main content
Glama

mpq_read

Read a named member from a local MPQ archive: text files return in 24,000-character chunks via start offset, while binary files return size, storage, type, and a 64-byte hex preview.

Instructions

Read one member of an MPQ archive on the local disk. A text member (the .txt data tables, .ini, lists) comes back as text, 24,000 characters per call: pass start (a character offset; the reply says where to continue) for the rest. A binary member comes back as a short summary instead: size, how it's stored, what kind of file it looks like (sound, sprite, string table, compiled table...) and a hex dump of its first 64 bytes; use mpq_extract to get the file itself, read_strings for .tbl string tables. path: the .mpq file. member: the full name inside the archive, e.g. data\global\excel\Weapons.txt (case and slash direction don't matter), or FileNNNNNNNN.xxx for an unnamed one as mpq_list shows it. listfile: optional external list of names, only needed to decrypt an encrypted member the archive doesn't name. Reads: stored, imploded (PKWARE DCL) and multi-compressed members (zlib, bzip2, PKWARE, Huffman, ADPCM mono and stereo), encrypted or not, sectored or single-unit. Not read: LZMA and sparse compression, patch files, and archives newer than format version 1. The table is whatever is in that archive: say which archive (and so which patch or mod) it came from.

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": "mpq_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
startNo
memberYes
listfileNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it states the 24,000-character truncation and continuation mechanism, that binary members yield only a summary (size, storage method, file-type guess, 64-byte hex dump), and the complete support matrix — stored/imploded/multi-compressed, encrypted or not — plus explicit non-support for LZMA, sparse compression, patch files, and archives newer than format version 1.

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 piece is dense but every sentence earns its place, and the ordering is sensible: core behavior, then the text/binary branch, then parameters, then capability limits. The parameter explanations are packed into one run-on stretch, and labeled lines or a short list would make the path/member/start/listfile semantics scannable rather than requiring a second read.

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?

For a four-parameter read tool with no annotations and a non-trivial decoding surface, nothing an agent needs is missing: pagination contract, binary-summary limits, encryption handling, unsupported formats, and the caveat that the returned table belongs to whichever archive (and thus patch or mod) was opened. An output schema exists, so the return-value discussion is bonus rather than obligation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 supply all parameter meaning, and it does for all four: path is the .mpq file, start is a character offset whose next value is reported in the reply, member is the full internal name with case/slash-direction insensitivity and the FileNNNNNNNN.xxx fallback for unnamed members, and listfile is an optional external name list for encrypted members.

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?

"Read one member of an MPQ archive on the local disk" names a specific verb and resource, and the description immediately distinguishes the two output modes (text member vs. binary member) while naming siblings mpq_extract and read_strings for the cases this tool does not serve.

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?

Explicit routing is given: use mpq_extract to get a binary file itself, read_strings for .tbl string tables, and pass start to continue a long text member. The 'listfile' parameter is scoped to exactly one situation (decrypting an encrypted member the archive doesn't name), so there is no guesswork about when to supply it.

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