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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| start | No | ||
| member | Yes | ||
| listfile | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |