Skip to main content
Glama

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

NameRequiredDescriptionDefault
pathYes
limitNo
out_dirYes
listfileNo
overwriteNo
member_or_patternYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/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 well: it discloses a path-traversal safety guarantee ('It never writes outside out_dir: a member whose name would land elsewhere is refused'), the default non-destructive behavior toward existing files, out_dir auto-creation, and a hard ~100s runtime ceiling with partial-progress semantics.

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?

Front-loaded with purpose, then a compact parameter block in schema order, then behavioral caveats. Nearly every sentence earns its place, though the parameter prose runs long enough that an agent must read the whole block rather than skim.

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 6-parameter extraction tool with no annotations, the description covers safety, defaults, timeout/resume behavior, and pattern syntax, and an output schema exists so return-value detail is unnecessary ('Reports what it wrote' suffices). Nothing an agent needs in order 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.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate for all six parameters — and it does, documenting path, out_dir creation, listfile's purpose (archives lacking their own list), the 1-5000 range and default of limit, and overwrite's default-off behavior. Most valuably it explains member_or_pattern's accepted syntax (shell wildcards, plain substring, case- and slash-insensitive), which the bare schema does not.

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 specific verb and resource ('Extract members of an MPQ archive on the local disk into a folder') and pins down the exact semantics with a concrete path example showing folder structure preservation. It also differentiates itself from the sibling read tool by noting 'Same format support and limits as mpq_read', making clear this writes to disk rather than reads.

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

Usage Guidelines4/5

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

Gives strong operational guidance: how to recover from the ~100 second timeout ('run it again (files already written are skipped) or narrow the pattern') and clarifies overwrite/limit defaults. What it lacks is explicit routing advice — it never says to use mpq_list first to discover member names or to prefer mpq_read for inspecting a single file's contents.

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