Skip to main content
Glama
jackalterman

Windows Diagnostics MCP Server

by jackalterman

get_system_diagnostics

Retrieve detailed Windows system diagnostics, including crash reports, reboots, and system health analysis. Specify days back and toggle detailed event data for in-depth troubleshooting.

Instructions

Get comprehensive Windows system diagnostics including crashes, reboots, and system health

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysBackNoNumber of days back to analyze (default: 7)
detailedNoInclude detailed event information

Implementation Reference

  • The main handler function getSystemDiagnostics that runs a PowerShell diagnostic script, processes results, and formats a comprehensive system health report.
    export async function getSystemDiagnostics(args: { daysBack?: number; detailed?: boolean }) {
        const daysBack = args?.daysBack || 7;
        const detailed = args?.detailed || false;
        
        const params = {
          DaysBack: daysBack,
          JsonOutput: true,
          ...(detailed && { Detailed: true })
        };
    
        const result = await runPowerShellScript(DIAGNOSTIC_SCRIPT, params) as AllTypes.DiagnosticResults;
    
        return {
          content: [
            {
              type: 'text',
              text: `# Windows System Diagnostics Report\n\n## Summary\n- **Analysis Period**: ${result.Summary.AnalysisPeriodDays} days\n- **Total Events**: ${result.Summary.TotalEventsAnalyzed}\n- **Critical BSOD Events**: ${result.Summary.CriticalBSODCount}\n- **Unexpected Shutdowns**: ${result.Summary.UnexpectedShutdownCount}\n- **Application Crashes**: ${result.Summary.TotalApplicationCrashes}\n- **Generated**: ${result.Summary.GeneratedAt}\n\n## System Information\n- **OS**: ${result.SystemInfo.OSVersion}\n- **Last Boot**: ${result.SystemInfo.LastBootTime}\n- **Current Uptime**: ${result.SystemInfo.CurrentUptimeDays} days, ${result.SystemInfo.CurrentUptimeHours} hours, ${result.SystemInfo.CurrentUptimeMinutes} minutes\n- **Total Memory**: ${result.SystemInfo.TotalMemoryGB} GB\n- **Reboots in Period**: ${result.SystemInfo.RebootCountInPeriod}\n\n## Critical Events\n${result.BSODEvents.length > 0 ? `### BSOD Events (⚠️ Critical)\n${result.BSODEvents.map((e: AllTypes.EventInfo) => `- **${e.Time}**: ${e.Description} (Event ID: ${e.EventID})`).join('\n')}` : '### BSOD Events\n- No BSOD events found ✅'}\n\n${result.ShutdownEvents.filter((e: AllTypes.EventInfo) => e.EventID === 6008).length > 0 ? `### Unexpected Shutdowns (⚠️ Warning)\n${result.ShutdownEvents.filter((e: AllTypes.EventInfo) => e.EventID === 6008).map((e: AllTypes.EventInfo) => `- **${e.Time}**: ${e.Description}`).join('\n')}` : '### Unexpected Shutdowns\n- No unexpected shutdowns found ✅'}\n\n## Application Crashes\n${result.ApplicationCrashes.length > 0 ? result.ApplicationCrashes.map((c: AllTypes.ApplicationCrash) => `- **${c.Application}**: ${c.CrashCount} crashes (Latest: ${c.LatestCrash})`).join('\n') : '- No application crashes found ✅'}\n\n## Hardware & Driver Issues\n${result.HardwareErrors.length > 0 ? `### Hardware Errors\n${result.HardwareErrors.map((e: AllTypes.HardwareError) => `- **${e.Time}**: ${e.Source}`).join('\n')}` : '### Hardware Errors\n- No hardware errors found ✅'}\n\n${result.DriverIssues.length > 0 ? `### Driver Issues\n${result.DriverIssues.map((d: AllTypes.DriverIssue) => `- **${d.DriverService}**: ${d.IssueCount} issues`).join('\n')}` : '### Driver Issues\n- No driver issues found ✅'}\n\n## Memory Dumps\n${result.MemoryDumps.length > 0 ? result.MemoryDumps.map((d: AllTypes.MemoryDump) => `- **${d.Type} Dump**: ${d.Path} (Last Modified: ${d.LastWrite}, Size: ${d.SizeMB || d.SizeKB} ${d.SizeMB ? 'MB' : 'KB'})`).join('\n') : '- No memory dumps found'}\n\n## Recent System Events\n${result.ShutdownEvents.slice(0, 5).map((e: AllTypes.EventInfo) => `- **${e.Time}**: ${e.Description} (Event ID: ${e.EventID})`).join('\n')}`,
            },
          ],
        };
      }
  • The input schema definition for the get_system_diagnostics tool, specifying parameters daysBack and detailed.
      name: 'get_system_diagnostics',
      description: 'Get comprehensive Windows system diagnostics including crashes, reboots, and system health',
      inputSchema: {
        type: 'object',
        properties: {
          daysBack: {
            type: 'number',
            description: 'Number of days back to analyze (default: 7)',
            default: 7,
          },
          detailed: {
            type: 'boolean',
            description: 'Include detailed event information',
            default: false,
          },
        },
      },
    },
  • src/index.ts:539-541 (registration)
    The switch case in the CallToolRequestHandler that routes calls to the getSystemDiagnostics handler.
    case 'get_system_diagnostics':
      return await diagnostics.getSystemDiagnostics(args as { daysBack?: number; detailed?: boolean });
    case 'get_shutdown_events':
  • src/index.ts:9-9 (registration)
    Import of the diagnostics module containing the tool handler.
    import * as diagnostics from './tools/diagnostics.js';
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions what information is included ('crashes, reboots, and system health') but doesn't describe the return format, whether it requires admin privileges, if it's a read-only operation, or any performance/rate considerations. For a diagnostic tool with zero annotation coverage, this leaves significant gaps.

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 a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized and front-loaded with the essential information.

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

Completeness3/5

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

For a diagnostic tool with 2 parameters (fully documented in schema) but no annotations and no output schema, the description provides basic purpose but lacks behavioral context and usage guidance. It's minimally adequate but has clear gaps in explaining what the tool actually returns and when to use it versus siblings.

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%, so the schema already fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('comprehensive Windows system diagnostics') with specific scope ('including crashes, reboots, and system health'). It distinguishes from some siblings like 'get_bsod_events' or 'get_system_uptime' by being more comprehensive, though it doesn't explicitly differentiate from all siblings like 'analyze_system_stability'.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_bsod_events', 'get_shutdown_events', and 'analyze_system_stability', there's no indication of when this broader diagnostic tool is preferable to more specific ones or what context warrants its use.

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

Related 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/jackalterman/windows-diagnostic-mcp-server'

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