debug_environment
Inspect and debug the MCP server's environment and configuration to identify setup issues.
Instructions
Debug tool to check MCP server environment and configuration
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "debug_environment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/debug.ts:23-61 (handler)Handler function for the debug_environment tool. Reads environment variables (HELIOS_API_URL, HELIOS_API_KEY, NODE_ENV, etc.), optionally performs a test API call to verify connectivity, and returns environment info, API test result, and timestamp.
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)Tool definition with name 'debug_environment', 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:27-27 (registration)Import of debugTools and debugHandlers from the debug.ts module into the main server.
import { debugTools, debugHandlers } from './tools/debug.js' - src/index.ts:128-141 (registration)Registration of all debug tools (including debugEnvironmentTool) into the server's allTools array for listing via ListToolsRequestSchema.
// 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:143-155 (registration)Registration of debug_environment handler in the allHandlers map. When CallToolRequestSchema receives a call with name 'debug_environment', it dispatches to this handler.
this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }