import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { z } from 'zod'; import { VirtFusionClient } from '../client.js'; import { formatErrorResponse } from '../errors.js'; export function registerGeneralTools(server: McpServer, client: VirtFusionClient): void { server.tool( 'general_test_connection', 'Test the API connection to VirtFusion', {}, async () => { try { const result = await client.get('/connect'); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { return formatErrorResponse(error); } } ); }