Skip to main content
Glama

sharphy_clean_obfuscation

Cleans obfuscated .NET assemblies for reverse engineering by demangling control flow flattening, trimming dead code and NOP sleds, and analyzing dynamic proxy delegates to output a cleaner assembly.

Instructions

Demangles control flow flattening (CFG demangling), trims dead code and excessive NOP sleds, and analyzes dynamic proxy delegates. Use this tool when reverse engineering obfuscated assemblies to produce a cleaner assembly for analysis. Do NOT use for direct opcode modification (use 'sharphy_patch_il'). Mutates by creating a cleaned assembly at outputPath.

Input Schema

NameRequiredDescriptionDefault
outputPathYesDestination path for the cleaned output assembly
assemblyPathYesPath to the obfuscated input assembly

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the load; it discloses the mutation behavior and that output goes to outputPath, clarifying the input is not patched in place. Minor gaps remain (e.g., whether the original is preserved, permissions needed, or runtime cost), keeping it below 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, zero waste, with the core capability stated first followed by usage routing and the mutation note. Well front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with full schema coverage, the description covers purpose, selection guidance, and mutation semantics adequately. It does not mention what the tool returns or reports (no output schema exists), which is a small omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both parameters are already documented with descriptions, so the baseline is 3. The description only restates the destination concept ('creating a cleaned assembly at outputPath') without adding format or constraint detail beyond the 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?

States specific verbs and resources: CFG demangling, dead-code trimming, NOP-sled trimming, and dynamic proxy delegate analysis, all targeting obfuscated assemblies. It also explicitly names the sibling it is not (sharphy_patch_il), letting an agent distinguish it without opening schemas.

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?

Explicit when-to-use ('when reverse engineering obfuscated assemblies') and when-not ('Do NOT use for direct opcode modification'), with the correct alternative named (sharphy_patch_il). Nothing is left to inference about tool selection.

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