read_strings
Look up Diablo II and Resurrected text strings in .tbl, MPQ, or JSON files by key, number, or search term; see results, counts, language, and lookup priority.
Instructions
Look up the game's text strings in files on the local disk: Diablo II's string tables (string.tbl,
expansionstring.tbl, patchstring.tbl) or Diablo II: Resurrected's JSON string files.
source: one path or a list of paths, each a .tbl file; an MPQ archive (its data\local\lng<language>
string.tbl, expansionstring.tbl and patchstring.tbl are read, whichever it holds: give d2data.mpq, d2exp.mpq
and patch_d2.mpq together for the full set); a folder holding those .tbl files (or a mod folder with
data/local/lng// inside); a folder of Resurrected's data/local/lng/strings/*.json; one such .json; or
a .json written by tbl_to_json.
key: a string key (case-sensitive, e.g. 'hax' or 'ModStr1a'), or a string number (e.g. 22000, or an id in
Resurrected's files). search: text to find in keys and strings, case ignored. limit: results shown for search,
1 to 100 (default 20). With neither key nor search: what was loaded, with counts.
language: for MPQs and mod folders the language folder (default eng; also deu, fra, esp, ita, pol, kor, chi,
jpn...); for Resurrected the JSON field (default enUS; also deDE, frFR, zhTW...).
For the classic tables the reply gives the order the game looks a key up in (patchstring, then
expansionstring, then string; the first that has the key wins), which file each result is from, its number
(string.tbl counts from 0, patchstring.tbl from 10000, expansionstring.tbl from 20000) and any lower-priority
file that also defines the key. When several sources hold a file of the same name, the last one listed is the
one used, as a patch or mod archive replaces the base game's. Line breaks show as \n; colour codes show as
ÿc plus a character. The strings are those of the files given: say which game version, patch or mod they
belong to from where the files came from; Resurrected's files are Resurrected only.
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": {
"source": "<source>"
},
"name": "read_strings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | ||
| limit | No | ||
| search | No | ||
| source | Yes | ||
| language | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |