Skip to main content
Glama
jakedx6
by jakedx6

debug_environment

Check MCP server environment and configuration to identify and resolve setup issues.

Instructions

Debug tool to check MCP server environment and configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The async handler function `debugEnvironment` that implements the core logic of the 'debug_environment' tool. It collects environment variables, masks sensitive data, tests API connectivity, and returns diagnostic information.
    export const debugEnvironment = async (args: any) => { logger.info('Debug environment called') const envInfo = { HELIOS_API_URL: process.env.HELIOS_API_URL || 'NOT SET', HELIOS_API_KEY_PREFIX: process.env.HELIOS_API_KEY ? process.env.HELIOS_API_KEY.substring(0, 20) + '...' : 'NOT SET', HELIOS_API_KEY_LENGTH: process.env.HELIOS_API_KEY?.length || 0, NODE_ENV: process.env.NODE_ENV || 'NOT SET', CWD: process.cwd(), NODE_VERSION: process.version, } // Try a direct API call let apiTestResult = 'Not tested' if (process.env.HELIOS_API_URL && process.env.HELIOS_API_KEY) { try { const response = await fetch(`${process.env.HELIOS_API_URL}/api/mcp/projects?limit=1`, { headers: { 'Authorization': `Bearer ${process.env.HELIOS_API_KEY}`, 'Content-Type': 'application/json' } }) apiTestResult = `${response.status} ${response.statusText}` if (response.ok) { const data = await response.json() apiTestResult += ` - ${data.projects?.length || 0} projects found` } } catch (error) { apiTestResult = `Error: ${error instanceof Error ? error.message : String(error)}` } } return { environment: envInfo, apiTest: apiTestResult, timestamp: new Date().toISOString() } }
  • The MCPTool object definition for 'debug_environment', including name, description, and empty inputSchema (no parameters required).
    export const debugEnvironmentTool: MCPTool = { name: 'debug_environment', description: 'Debug tool to check MCP server environment and configuration', inputSchema: { type: 'object', properties: {} } }
  • src/index.ts:143-155 (registration)
    Registration of the debug_environment handler by spreading `debugHandlers` (which maps 'debug_environment' to `debugEnvironment`) into the central `allHandlers` object used for tool execution.
    this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }
  • src/index.ts:128-141 (registration)
    Registration of the debug_environment tool schema by spreading `debugTools` into the central `allTools` array used for listing available tools.
    // Combine all tools and handlers this.allTools = [ ...Object.values(projectTools), ...Object.values(taskTools), ...Object.values(documentTools), ...Object.values(conversationTools), ...Object.values(contextAggregationTools), ...Object.values(workflowAutomationTools), ...Object.values(intelligentSearchTools), ...Object.values(analyticsInsightsTools), ...Object.values(initiativeTools), ...promptToProjectTools, ...Object.values(debugTools), ]
  • src/index.ts:27-27 (registration)
    Import of debugTools and debugHandlers from src/tools/debug.ts, enabling their registration in the MCP server.
    import { debugTools, debugHandlers } from './tools/debug.js'

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/jakedx6/helios9-MCP-Server'

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