decompile_type
Decompile a .NET class to C# source code by providing the assembly path and fully-qualified type name. Returns decompiled code or an error on failure.
Instructions
Decompile a single class to C# via ilspycmd.
Args:
path: path to a .dll / .exe .NET assembly
fqn: fully-qualified type name (e.g. MyGame.PlayerController).
Discover candidates with :func:parse_assembly first.
Returns::
{"path": "...", "fqn": "...", "code": "C# source..."}On decompiler failure (e.g. an obfuscated control-flow pattern
ilspycmd refuses to lift, or ilspycmd not installed), returns
code: null and a non-null error field. ilspycmd is the
industry-standard CLI for ILSpy; for protected binaries the next
step is re-decompile (which calls into de4dot for unpacking)
before re-running this tool.
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": {
"path": "<path>",
"fqn": "<fqn>"
},
"name": "decompile_type"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| fqn | Yes |