Skip to main content
Glama
aayushmdesai

mcp-dotnet-diagnostics

get_thread_stats

Analyze .NET ThreadPool statistics to diagnose thread starvation causing slow response times and deadlocks by examining worker threads, queue length, and available threads.

Instructions

Returns .NET ThreadPool statistics for a target process including worker thread count, available threads, queue length, and completed work items. Use this when investigating slow response times, request timeouts, or deadlocks — high queue length and low available threads indicates thread starvation, which is a common cause of latency spikes in .NET APIs. Call get_memory_stats first — GC pressure is a frequent cause of thread starvation.

Input Schema

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

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

No annotations present, so description carries full burden. It explains that the tool samples counters over a period (sampleSeconds) and returns specific statistics. While it doesn't explicitly state read-only nature, the context implies no destructive side effects. A perfect score would require explicit safety guarantees.

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 sentences with no wasted words. Front-loaded with the core functionality, then usage context, then a recommended order. Every 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 two parameters, 100% schema coverage, no output schema, and moderate complexity, the description is complete: explains return values, use cases, and sequence with sibling tools.

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% with descriptions for both pid and sampleSeconds. The description adds context around sampleSeconds ('how long to sample counters') but doesn't significantly expand beyond schema. Baseline 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 the tool returns .NET ThreadPool statistics (worker thread count, available threads, queue length, completed work items) for a target process. It distinguishes from siblings by specifying the exact metrics and linking to related tools like get_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 Guidelines5/5

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

Provides explicit when-to-use guidance: 'investigating slow response times, request timeouts, or deadlocks.' Also recommends calling get_memory_stats first, giving clear sequential usage instructions.

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