Skip to main content
Glama

run_il_simplification

Apply IL simplification passes (constant folding, dead branch elimination, opaque predicate evaluation, string decryption) to a .NET method for optimized intermediate language code.

Instructions

Run a d810-ng-style IL simplification pass set on one method.

Currently supported passes:

  • constant_fold — replace arithmetic on constants with the constant result.

  • dead_branch_elim — remove branches that are provably dead after constant folding.

  • opaque_predicate_eval — evaluate predicates whose truth is provable from prior dataflow.

  • string_decrypt — replace ldstr; call Get<name>(); ret patterns with the literal string. The decryption function name is auto-detected from the assembly's #Strings heap.

Args: path: path to a .NET assembly method_fqn: "Namespace.Type::MethodName" passes: optional override; default is ["constant_fold", "dead_branch_elim", "opaque_predicate_eval", "string_decrypt"].

Returns::

{
  "path": "...",
  "method_fqn": "...",
  "passes_applied": [...],
  "before_il_size": N,
  "after_il_size": M,
  "il_before": "...",
  "il_after": "..."
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
method_fqnYes
passesNo
Behavior2/5

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

No annotations exist, so the description carries full burden. It does not disclose whether the tool modifies the assembly in-place or only returns transformed IL. While it lists passes and return format, the mutation aspect is unclear, which is a significant gap for a tool that likely modifies code.

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

Conciseness4/5

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

The description is well-structured with sections for introduction, passes list, args, and returns. It is front-loaded with the main purpose. Slightly lengthy due to detailed pass explanations, but each sentence adds value.

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

Completeness5/5

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

Given no output schema and no annotations, the description covers all aspects: purpose, parameters, pass semantics, and return format with a JSON example. It is thorough enough for an agent to invoke the tool correctly.

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

Parameters5/5

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

With 0% schema coverage, the description fully explains each parameter: path as .NET assembly path, method_fqn with format, and passes with allowed values and defaults. This provides essential meaning beyond the bare 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?

The description clearly states the tool runs a d810-ng-style IL simplification pass set on one method, listing specific passes and differentiating from sibling tools like decompile_method.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context on what the passes do but does not explicitly state when to use this tool versus alternatives like decompile_method or get_methods. Usage is implied but not guided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Heretek-RE/re-dotnet'

If you have feedback or need assistance with the MCP directory API, please join our Discord server