DecompilerServer MCP
Use DecompilerServer as the primary source of truth for loaded .NET assemblies. Do not guess member IDs or fall back to shell scans after one failed symbol lookup; use the discovery and diagnostic tools first.
Default Workflow
- Load or confirm context:
load_assemblywithassemblyPath, orgameDirplusassemblyFilefor Unity layouts.list_contextsorstatusto confirm aliases and current context.- Use
get_server_statsonly when cache, index, or performance diagnostics matter.
- Discover symbols:
- Use
search_symbolsfirst for fragments or when unsure whether a name is a type or member. - Use
resolve_member_idfirst for fully-qualified or XML-doc-like guesses such asNamespace.Type.Member,Namespace.Type:Member, orM:Namespace.Type.Member. - Use
search_typeswhen looking only for types. - Use
search_memberswhen looking only for methods, fields, properties, or events.
- Use
- Inspect type surface:
- Use
list_membersorget_members_of_typeafter resolving a type. - Prefer
mode: "signatures"for orientation andmode: "full"only when extra metadata is needed.
- Use
- Read code:
- Use
get_decompiled_sourcefor complete focused source. - Use
plan_chunkingandget_source_slicefor large types or methods.
- Use
- Analyze relationships:
- Use
find_callers,find_callees, andfind_usagesfor call/use questions. - Use
find_base_types,find_derived_types,get_overrides, andget_implementationsfor inheritance questions. - Use
get_ilbefore proposing transpiler anchors;suggest_transpiler_targetsshould be treated as a real-IL hint list, not a substitute for reading IL.
- Use
- Compare versions:
- Use
compare_contextsfor structural alias-level overview. - Use
compare_symbolsfor type/member drill-down. - Use
compare_symbolswithcompareMode: "body"only for method bodies.
- Use
Recovery Rules
- If a member-based tool returns
type_not_found, callsearch_typesorsearch_symbolswith the type fragment. - If it returns
member_not_found, inspecterror.details.candidatesand call the suggestedget_members_of_typeorsearch_symbols. - If
search_symbolsreturnsdiagnostic.code: "member_guess_unresolved", the type resolved but the member guess did not; inspect the returned direct members or call the suggestedlist_members. - If it returns
wrong_symbol_kind, switch to the tool for the actual kind instead of retrying the same call. - If a
memberIdcontains an MVID, follow-up calls normally do not needcontextAlias. - Use explicit
contextAliaswhen working from human-entered symbols or when multiple versions are loaded and no canonicalmemberIdhas been resolved yet.
Tool Choice Bias
search_symbolsbeats broad shell search for unknown names.resolve_member_idbeatssearch_symbolsfor fully-qualified stale method guesses because its errors return typed candidates.list_membersbeats guessing conventional method names.get_source_slicebeats dumping huge source into context when line ranges are enough.get_ilbeats external IL tools for first-pass opcode inspection; uselimit/cursororstartOffset/endOffsetfor large methods.find_calleesreturns callee-shaped fields. PrefertargetMemberId,symbol,opcode,offset, andresolutionover legacyinMember/inTypealiases.- Shell tools are a last resort for files outside loaded assemblies or for validating packaging/runtime environment, not for ordinary symbol exploration.
Source: pardeike/DecompilerServer — distributed by TomeVault.