Skip to main content
Glama

mpq_create

Pack a folder into a new MPQ archive in Diablo II 1.x format with selectable compression, then verify each member against its source file.

Instructions

Pack a folder into a new MPQ archive (format version 1, as Diablo II 1.x uses) on the local disk. Every file under src_dir goes in under its path relative to src_dir, with backslashes (src_dir/data/global/excel/x.txt becomes data\global\excel\x.txt), plus a (listfile) naming them all. src_dir: the folder to pack. out_path: the .mpq to write; an existing file is refused unless overwrite is true. compression: 'zlib' (default), 'bzip2', 'pkware', 'implode' (the older whole-file PKWARE flag) or 'store'. After writing, the archive is opened again with this package's reader and every member compared with its source file; the result says so. That is the only check made: the output has not been loaded by the game itself, so try it in the game before relying on it. Members aren't encrypted. It only makes a new archive; it can't add to or change an existing one. Member names must fit Latin-1.

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": {
      "src_dir": "<src_dir>",
      "out_path": "<out_path>"
    },
    "name": "mpq_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
src_dirYes
out_pathYes
overwriteNo
compressionNozlib

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?

No annotations are provided, so the description carries the full burden and does so well: it discloses the overwrite refusal, the post-write verification pass (reopen and compare every member against source), the limits of that verification (not loaded by the game), that members are unencrypted, and the Latin-1 filename constraint. These are exactly the mutation-safety facts an agent needs.

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 and format, then parameters, then caveats; nearly every sentence adds a distinct fact. It is dense as a single block and would read better as a short list, but there is little dead wording.

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 4-parameter mutating tool with no annotations, the description covers inputs, naming semantics, overwrite behavior, verification, and known limits. An output schema exists, so it only needs to mention that verification results are reported, which it does.

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 compensate and does: it explains src_dir and the resulting relative-path/backslash naming rule, out_path and the overwrite interaction, and enumerates all compression values including a meaningful gloss on 'implode' as the legacy whole-file PKWARE flag. The enum values are not even declared in the schema, so this is essential added meaning.

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 ('Pack a folder into a new MPQ archive') and pins down the exact format variant (version 1, Diablo II 1.x). It also states the core behavior that distinguishes it from the extract/list/read siblings: it only creates, it cannot modify an existing archive.

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 clear when-to-use context (creating a fresh archive from a folder tree, with the implied extraction/listing counterparts handled by siblings) plus an explicit 'when not' ('it can't add to or change an existing one'). It also tells the agent to test the output in-game before relying on it. It does not name an alternative tool explicitly, which keeps it just below a 5.

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