get_server_status
Verify running IDE server processes to prevent resource conflicts. Checks Tree-sitter parser status and purs IDE server availability. Use before starting new IDE servers to ensure no duplicate processes.
Instructions
Check if IDE server processes are running to avoid resource conflicts. Shows status of Tree-sitter parser (lightweight code analysis) and purs IDE server (process for type checking). ALWAYS use this before starting new IDE servers to prevent running multiple processes simultaneously.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.js:210-225 (handler)The handler function that executes the tool logic, returning the MCP server status including version, Tree-sitter initialization status, and purs IDE server details (status, port, project path, recent logs).async function internalHandleGetServerStatus() { const statusResponse = { status: 'running', // Overall server status purescript_tools_mcp_version: SERVER_INFO.version, treeSitterInitialized, purs_ide_server_status: { // Renamed for clarity and to match test assertion expectation status: pursIdeProcess ? (pursIdeIsReady ? 'ready' : 'starting') : (pursIdeServerPort ? 'stopped' : 'not_started'), running: !!pursIdeProcess, // Keep this for direct boolean check if needed ready: pursIdeIsReady, port: pursIdeServerPort, projectPath: pursIdeProjectPath, recentLogs: pursIdeLogBuffer.slice(-10) } }; return { content: [{ type: "text", text: JSON.stringify(statusResponse, null, 2) }] }; }
- index.js:558-562 (registration)Registration of the 'get_server_status' tool in the TOOL_DEFINITIONS array used by the 'tools/list' MCP method, including name, description, and input schema (no parameters required).{ name: "get_server_status", description: "Check if IDE server processes are running to avoid resource conflicts. Shows status of Tree-sitter parser (lightweight code analysis) and purs IDE server (process for type checking). ALWAYS use this before starting new IDE servers to prevent running multiple processes simultaneously.", inputSchema: { type: "object", properties: {}, additionalProperties: false }, },
- index.js:792-792 (registration)Mapping of the tool name to its handler function in the INTERNAL_TOOL_HANDLERS object, used by the 'tools/call' MCP method."get_server_status": internalHandleGetServerStatus,
- index.js:561-561 (schema)Input schema definition for the tool: accepts an empty object (no parameters).inputSchema: { type: "object", properties: {}, additionalProperties: false },