Skip to main content
Glama

read_d2r_json

Reads Diablo II: Resurrected JSON files by key to inspect UI layouts, item maps, missiles, monsters, or strings; omit the key to outline a file's widgets or keys.

Instructions

Read a Diablo II: Resurrected JSON file by key: a UI layout (e.g. 'hireablespanelhd.json', 'bankexpansionlayouthd.json', 'controller/characterstatspanelhd.json'), the HD item art map ('items.json': item code to data/hd/items asset; 'uniques.json', 'sets.json'), 'missiles.json', 'monsters.json' or a strings file ('item-names.json'). Without key it outlines the file: a layout's widget tree (type and name of each widget, children indented), or a list's keys. key: a widget name in a layout ('HireablesPanel', 'Template'), an item code ('hax'), a strings Key, or a dotted path ('fields.rect'). source: 'd2r-vanilla' (the default: unmodded files from D2R 2.4/2.5, before Reign of the Warlock), or 'd2r-howto' or 'd2rmm-mods' for a mod's own JSON (modified copies, so say so). These are D2R only; Legacy has no JSON. Find files with search_code first.

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": {
      "file": "<file>"
    },
    "name": "read_d2r_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNo
fileYes
sourceNod2r-vanilla

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/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 most of it: it discloses that omitting key returns an outline rather than content, that d2r-vanilla is unmodded 2.4/2.5 data while other sources are modified copies the agent should flag, and that Legacy files are unavailable. It does not mention truncation/size limits or what happens when a key is not found, which are the main remaining behavioral gaps.

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 the core read action and the no-key/key distinction before the examples, and every sentence carries operational detail. The parenthetical example lists are dense enough to slow parsing slightly, but nothing is truly redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return-shape explanation is unnecessary, and the description covers discovery path, both invocation modes, and source provenance caveats. It falls short only on the two undescribed source values and on error/empty-key behavior for a tool that clearly can be pointed at nonexistent paths.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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 and largely does: key is explained across all four shapes (widget name, item code, strings Key, dotted path with the 'fields.rect' example) and file is illustrated with real filenames. The gap is source, where the enum has five values (d2rmm, d2rmm-mods, d2r-vanilla, d2r-howto, d2rl-plugins) but only three are described, leaving d2rmm and d2rl-plugins undefined.

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 ('Read a Diablo II: Resurrected JSON file') and immediately enumerates the concrete file families it covers (UI layouts, items.json art map, missiles/monsters, strings), so an agent can tell it apart from read_bin_table, read_strings, or read_code without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit when-behavior for both modes (no key = outline the widget tree or list keys; key = drill into a widget/entry/path), routes discovery to a named sibling ('Find files with search_code first'), and states a clear exclusion ('These are D2R only; Legacy has no JSON').

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