Skip to main content
Glama

decomp_search

Search a patch's decompiled Diablo II binaries for string literals, constants, or function names, optionally within one binary, to locate matching addresses and lines.

Instructions

Search one patch's decompiled binaries for a string literal (e.g. 'Data\Global\Monsters'), a constant (decimal or 0x hex; both spellings match) or a function name (e.g. 'FUN_6fc31020', 'Ordinal_10079'). version: '1.00' to '1.14d' (the error lists them). binary optionally limits it to one, e.g. 'D2Game.dll', 'D2Client', 'Game.exe'. Returns up to 30 hits as binary, function name, address and the matching line; read one with decomp_function. This is Ghidra's decompiled output of Blizzard's own binaries (every DLL and EXE of each patch), not source code: function names are Ghidra's (FUN_, Ordinal_, thunk_...) or ours, variables are Ghidra's, and strings appear as labels like s_Data_Global_Monsters__6fb75f54 (the string's first 32 characters, punctuation as _; labelled in 1.00 to 1.10 and partly 1.14d, but hardly at all in 1.11 to 1.13d). Reading it is code reading, not testing: say what the code appears to do, not that you ran it. Cite version, binary and address (e.g. 1.09d D2Game.dll FUN_6fce44f0 @6fce44f0). In public replies quote only short snippets (a few lines), never whole functions. 1.14b and 1.14d have every DLL merged into Game.exe. For clean names use D2MOO (1.10f) or Redivivus (1.14d) first; these dumps are for other patches and for checking what a given patch's binary really does.

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": {
      "version": "<version>",
      "query": "<query>"
    },
    "name": "decomp_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes
binaryNo
versionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/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: 30-hit cap, result fields (binary, function name, address, matching line), the fact that names are Ghidra-generated rather than source symbols, the string-label encoding (

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?

The critical facts (what it searches, how to read a hit) are front-loaded and almost every sentence earns its place. Minor deductions for a run-on mid-section and an awkward line break inside the version-labelling sentence, which hurt scannability of an otherwise dense block.

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 three-parameter search over Ghidra dumps, the description covers the version/binary scoping quirks that would otherwise cause wrong calls, the 1.14b/1.14d Game.exe merge, and citation format. An output schema exists, yet the description still briefly names the returned fields, which is complete without redundancy.

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 and does: 'version' is bounded to '1.00' to '1.14d' with the note that errors list the valid set; 'binary' is optional and takes partial names like 'D2Client' or 'Game.exe'; 'query' accepts literals, decimal/hex constants ('both spellings match'), and function names. This adds real meaning absent from the bare string/anyOf/null schema.

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?

The first sentence names a specific verb and resource ('Search one patch's decompiled binaries') and enumerates the three query kinds it accepts with concrete examples ('Data\Global\Monsters', '0x' hex constants, 'FUN_6fc31020'). It also distinguishes itself from the sibling used to read a hit ('read one with decomp_function').

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?

It routes the agent explicitly: use this to find hits, then 'read one with decomp_function', and prefer D2MOO (1.10f) or Redivivus (1.14d) when clean symbol names matter because these dumps serve other patches. It also states the interpretive constraint ('code reading, not testing: say what the code appears to do, not that you ran it'), which is usage guidance, not just behavior.

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