Skip to main content
Glama

tbl_to_json

Convert a Diablo II .tbl string table into an editable JSON file, preserving entry order and invalid UTF-8 as hex for reliable rebuilding.

Instructions

Convert a Diablo II string table (.tbl) on the local disk to a JSON file that can be edited and turned back with json_to_tbl. path: the .tbl file (extract it from an MPQ with mpq_extract first). out: the .json to write; an existing file is refused unless overwrite is true. The JSON has the table's version, hash table size and lookup limit, then "entries": one {"key", "text"} per line in string-number order (an entry's place in the list is its number, so add new strings at the end and don't reorder). Text is UTF-8; a key or text that isn't valid UTF-8 is kept exactly as "key_hex" / "text_hex". The reply says whether json_to_tbl would rebuild the same bytes from it.

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>",
      "out": "<out>"
    },
    "name": "tbl_to_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
outYes
pathYes
overwriteNo

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 that an existing output file is refused unless overwrite is true, that entries must not be reordered because list position is the string number, that invalid UTF-8 is preserved as key_hex/text_hex, and that the reply reports whether a byte-identical rebuild is possible.

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?

Purpose is front-loaded and nearly every clause carries load-bearing detail. The single dense block mixes parameter docs, JSON shape, and ordering rules together, which makes it slightly harder to scan than a structured layout would be.

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?

Even though an output schema exists, the description adds the non-obvious parts an agent needs: the emitted JSON layout, the ordering invariant, UTF-8 fallback behavior, and the byte-equivalence check in the response. Nothing material is missing for a three-parameter local conversion tool.

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%, yet all three parameters are explained: path is the .tbl file with its extraction prerequisite, out is the .json destination, and overwrite governs refusal of an existing file. This fully compensates for the empty schema documentation.

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 ('Convert a Diablo II string table (.tbl) ... to a JSON file') and names the exact round-trip counterpart json_to_tbl, so the agent can distinguish it from the reverse tool without opening a schema.

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 a clear prerequisite ('extract it from an MPQ with mpq_extract first') and names the follow-up alternative (json_to_tbl). It stops short of stating when not to use this tool, but the workflow context is unambiguous.

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