search_code
Find source lines containing every query word (case-insensitive) with optional path filtering and return up to 40 file:line hits.
Instructions
Search the source for lines containing every word of the query (case-insensitive), e.g. 'srvdofunc'. Use it for column names from the data files, partial identifiers and comments. path optionally filters, e.g. 'D2Game/src/SKILLS' (D2MOO), 'D2Client/UI' (Redivivus), 'src/d2cs' (PvPGN), 'apps/realmd' (d2ds) or 'Layouts' (d2r-vanilla). Sources are as for find_symbol. For 1.14d, try 'Source/' in 'iblis-codex', 'specs/data' in 'd2-114d-codex' for TSV field layouts (also specs for formats, items, treasure, combat and monsters), or 'crates/' in 'd2gamma' for Rust. Cite d2gamma as a reimplementation. Returns up to 40 file:line hits. Diablo II: Resurrected modding sources (every result from them is D2R only, never Legacy or 1.13c): 'd2rmm' (D2RMM, the D2R mod manager: src/bridge/ModAPI.d.ts is the ModAPI that mod.js scripts call, D2RMM.readJson, writeJson, readTsv, writeTsv, readTxt, copyFile, getConfigJSON...; DOCS.md and README.md; and .claude/.md, its notes on D2R's files, mechanics, the modding API and mod examples), 'd2rmm-mods' (D2RMM's own example mods, each a mod.js plus mod.json config: expanded stash/cube/inventory, stackable runes, loot colours...), 'd2r-vanilla' (unmodded D2R files from patch 2.4/2.5, before 2.6 and Reign of the Warlock: Data/Global/UI/Layouts/.json, the UI layouts (hd and controller variants), Data/Local/Lng/strings/*.json, Additional Jsons/ items.json, uniques.json, sets.json (data/hd/items: item code to HD asset), missiles.json, monsters.json, plus 2.4's Excel .txt; read a JSON file by key with read_d2r_json), 'd2r-howto' (HighTechLowIQ's D2R modding guide: README.md walks through mod folders and -mod/-txt, new items with HD graphics, sets, stash tabs, maps, menus, runes, with the example mods' files under mods/), 'd2rl-plugins' (eezstreet's D2RLoader plugins for D2R 3.x and the ini options they add), 'd2r-spriteedit' (eezstreet's SpriteEdit: how D2R's .sprite format is read and written, in C#) and 'd2rai-toolkit' (Nugwa628's D2R engine, mechanics and format notes in knowledge/ and Python tools in modkit/).
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": {
"query": "<query>"
},
"name": "search_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| query | Yes | ||
| source | No | d2moo |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |