find_symbol
Locate where a function, struct, enum value, or macro is defined or declared across Diablo II source sets, returning file paths and line numbers with definitions listed first.
Instructions
Find where a function, struct, enum value or macro is defined or declared, e.g. 'D2SkillsTxt' or 'STATLIST_GetUnitStatUnsigned'. Returns file paths and line numbers, definitions first. source: 'd2moo' (1.10f game code: D2Common, D2Game; clean, well named) or 'redivivus' (all of 1.14d decompiled into C++: game code plus D2Client, D2Win, D2gfx, D2Sound, D2Net, Storm, Fog; names are reconstructions) or 'd2hausos' (seperaGG's decompilation of all of 1.00, every DLL and EXE, byte-matching; 1.00 only, link it, no credit line) or 'pvpgn' (PvPGN, the private Battle.net and D2 realm server: bnetd, d2cs, d2dbs, and its conf/ templates) or 'd2ds' (jaenster's d2-dedicated-server, in Zig: headless d2gs for 1.06b to 1.14d, realmd, d2ingress). For 1.14d, 'iblis-codex' is Legbreak's byte-matching Game.exe reconstruction in C++, 'd2-114d-codex' has Nugwa628's research specs and Ghidra tools, and 'd2gamma' is Nugwa628's Rust reimplementation. The Diablo II: Resurrected sources (see search_code) work too, e.g. 'readJson' in 'd2rmm'.
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": {
"name": "<name>"
},
"name": "find_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| source | No | d2moo |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |