Skip to main content
Glama
aayushmdesai

mcp-dotnet-diagnostics

get_memory_stats

Retrieves .NET memory metrics from a target process to diagnose memory leaks, excessive GC activity, or high memory pressure.

Instructions

Returns current .NET memory usage for a target process including total allocated bytes, GC generation collection counts (Gen0/Gen1/Gen2), Large Object Heap size, and memory pressure level. Use this when investigating memory leaks, unexpectedly high memory usage, frequent GC pauses, or slow application performance caused by garbage collection pressure. Call get_process_info first to confirm the process is reachable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYesThe process ID (PID) of the target .NET application
sampleSecondsNoHow long to sample counters in seconds (default: 2)
Behavior2/5

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

No annotations are provided, so the description carries the full burden for behavioral disclosure. It describes what data is returned but does not state whether the tool is read-only, if it has side effects, if it requires specific permissions, or if it might impact performance. The absence of these details limits transparency for an agent.

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?

The description is concise with three sentences: first defines the output, second gives use cases, third provides a prerequisite. It is front-loaded with the purpose and contains no unnecessary words, making it easy for an agent to parse quickly.

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?

The description enumerates the return fields (allocated bytes, GC counts, LOH size, memory pressure) in the absence of an output schema, providing good context. It also includes a prerequisite and use cases. However, it could mention whether the tool works on remote processes or if sampling behavior (sampleSeconds) is non-blocking, but overall it is sufficiently complete for a diagnostic tool.

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 description coverage is 100%, and the schema already provides clear descriptions for both parameters (pid and sampleSeconds). The tool description does not add additional meaning beyond the schema, so a baseline score of 3 is appropriate.

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 what the tool does: returns .NET memory usage for a target process, listing specific metrics (allocated bytes, GC counts, LOH size, memory pressure). It uses a specific verb ('Returns') and resource ('memory usage'), and distinguishes from siblings like get_process_info and get_gc_events by focusing on memory stats.

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

Usage Guidelines4/5

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

The description explicitly advises when to use this tool: investigating memory leaks, high memory usage, frequent GC pauses, or performance issues from GC pressure. It also provides a prerequisite: call get_process_info first to confirm reachability. It does not explicitly state when not to use or mention alternatives, but the context is clear.

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/aayushmdesai/mcp-dotnet-diagnostics'

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