mpq_extract
Extracts selected MPQ archive members to a target folder, preserving their folder structure and using name patterns to unpack files, then reports what was written.
Instructions
Extract members of an MPQ archive on the local disk into a folder, keeping their folder structure (data\global\excel\Weapons.txt becomes <out_dir>/data/global/excel/Weapons.txt). Reports what it wrote. path: the .mpq file. member_or_pattern: one member's full name, or a pattern for several: shell wildcards (*.txt, data\global\excel*, * for everything) or a plain piece of the name; case and slash direction don't matter. out_dir: the folder to write into (created if missing). listfile: optional external list of member names for an archive that lacks its own. limit: most files written per call, 1 to 5000 (default 200). overwrite: existing files are left alone and reported unless this is true. It never writes outside out_dir: a member whose name would land elsewhere is refused. Unpacking is pure Python and stops after about 100 seconds, saying how far it got: run it again (files already written are skipped) or narrow the pattern. Same format support and limits as mpq_read.
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_or_pattern": "<member_or_pattern>",
"out_dir": "<out_dir>"
},
"name": "mpq_extract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| limit | No | ||
| out_dir | Yes | ||
| listfile | No | ||
| overwrite | No | ||
| member_or_pattern | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |