Skip to main content
Glama
jackalterman

Windows Diagnostics MCP Server

by jackalterman

search_registry

Search the Windows registry by a specified keyword to retrieve entries, with options to limit results. Part of the Windows Diagnostics MCP Server for system analysis.

Instructions

Search the Windows registry by keyword

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxResultsNoMaximum number of results to return (default: 50)
searchTermYesKeyword to search for in the registry

Implementation Reference

  • The main handler function that executes the 'search_registry' tool. It runs a PowerShell script to search the registry, processes the JSON results, formats them into a markdown list, and returns an MCP-formatted response.
    export async function searchRegistry(args: { searchTerm?: string; maxResults?: number }) { const searchTerm = args.searchTerm ?? ''; const maxResults = args.maxResults ?? 50; const result = await runPowerShellScript( REGISTRY_SCRIPT, { SearchTerm: searchTerm, MaxResults: maxResults, JsonOutput: true, } ) as AllTypes.RegistryDiagnosticResults; const searchResultsText = result.SearchResults && result.SearchResults.length > 0 ? result.SearchResults .map( r => `- **Path**: ${r.Path} **Type**: ${r.Type} **Match**: ${r.Match} **Found**: ${r.Found || 'N/A'} **Value**: ${r.ValueName || 'N/A'} **Data**: ${r.ValueData || 'N/A'}` ) .join('\n\n') : 'No results found.'; return { content: [ { type: 'text', text: `# Registry Search Results for "${searchTerm}" ${searchResultsText}`, }, ], }; }
  • The input schema definition for the 'search_registry' tool, specifying parameters searchTerm (required string) and maxResults (optional number, default 50).
    inputSchema: { type: 'object', properties: { searchTerm: { type: 'string', description: 'Keyword to search for in the registry' }, maxResults: { type: 'number', description: 'Maximum number of results to return (default: 50)', default: 50 } }, required: ['searchTerm'] }
  • src/index.ts:549-550 (registration)
    The dispatch registration in the CallToolRequestSchema handler that routes calls to the searchRegistry function.
    case 'search_registry': return await registry.searchRegistry(args as { searchTerm?: string; maxResults?: number });
  • src/index.ts:118-136 (registration)
    The tool registration in the ListToolsRequestSchema handler, including name, description, and input schema.
    { name: 'search_registry', description: 'Search the Windows registry by keyword', inputSchema: { type: 'object', properties: { searchTerm: { type: 'string', description: 'Keyword to search for in the registry' }, maxResults: { type: 'number', description: 'Maximum number of results to return (default: 50)', default: 50 } }, required: ['searchTerm'] } },

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