debug_environment
Check MCP server environment and configuration to identify and resolve setup issues for the Helios-9 project management system.
Instructions
Debug tool to check MCP server environment and configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/debug.ts:23-61 (handler)The main execution function for the 'debug_environment' tool. Collects environment variables, tests API connectivity by making a fetch request to the projects endpoint, 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() } }
- src/tools/debug.ts:14-21 (schema)The MCPTool schema definition for 'debug_environment', including name, description, and empty input schema (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:129-141 (registration)Registration of debugEnvironmentTool by spreading debugTools into the allTools array, which is returned by the MCP listTools handler.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:143-155 (registration)Registration of the debug_environment handler by spreading debugHandlers into the allHandlers object, which is used by the MCP callTool handler to execute tools.this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }
- src/tools/debug.ts:64-70 (helper)Helper exports that package the tool schema and handler for easy import and registration in src/index.ts.export const debugTools = { debugEnvironmentTool } export const debugHandlers = { debug_environment: debugEnvironment }