Skip to main content
Glama

detect_managed_anti_debug

Scans .NET assemblies for managed anti-debug primitives such as IsDebuggerPresent and Debugger.IsAttached, returning method locations and evidence offsets per hit.

Instructions

Scan IL method bodies for managed anti-debug primitives.

Looks for IsDebuggerPresent, Debugger.IsAttached, Debug.Assert, Debugger.Break, and the curated indirect-check set (timing traps, process-name blacklists, registry probes). Returns {method_fqn, primitive, evidence_il_offset} per hit. The category is "managed-anti-debug"; no vendor is named.

Args: path: path to a .NET assembly max_per_method: cap per method (default 500; a single method with 500+ anti-debug calls is itself a signal — the cap is for safety, not for normality)

Returns::

{
  "path": "...",
  "hits": [{"method_fqn": "...", "primitive": "...",
            "evidence_il_offset": N}, ...],
  "by_primitive": {"IsDebuggerPresent": 4, ...}
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
max_per_methodNo
Behavior4/5

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

With no annotations, the description does a good job disclosing behavior: it explains the max_per_method cap (500) with rationale that a single method with 500+ is itself a signal. It also names the category and notes no vendor is named. However, it does not explicitly state that the tool is non-destructive or read-only, which is implied but not confirmed.

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 a brief intro, a list of primitives, and separate Args/Returns sections. It is somewhat lengthy but every sentence adds value, front-loading the purpose. A minor improvement could be even more concise.

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?

Given the complexity of anti-debug detection and the lack of an output schema, the description provides a thorough overview of what the tool does and returns. It lists the output structure with fields. It does not cover error handling or edge cases, but is sufficient for understanding the tool's functionality.

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

Parameters4/5

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

Schema description coverage is 0%, so the description fully compensates by explaining both parameters: 'path' as the .NET assembly path and 'max_per_method' with default 500 and a justification. This adds meaning beyond the bare schema types.

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 scans IL method bodies for managed anti-debug primitives, listing specific checks like IsDebuggerPresent, Debugger.IsAttached, etc. It also describes the output format, making the purpose unmistakable. It distinguishes itself from siblings by focusing on anti-debug detection.

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?

No explicit guidance on when to use this tool versus siblings. The description implies it is for detecting anti-debug primitives in .NET assemblies, but lacks when-not-to-use or alternative recommendations. Given the sibling tools, an explicit note would help.

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