health_check
Verify the operational status and connectivity of the Advanced PocketBase MCP Server to ensure it's ready for database interactions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/agent-simple.ts:316-348 (handler)Primary implementation of the health_check tool in the main PocketBaseMCPAgent. Registers the tool with server.tool and provides the async handler function that checks server status and PocketBase health connection.this.server.tool( 'health_check', { description: 'Check the health status of the MCP server and PocketBase connection' }, async () => { const status: Record<string, any> = { server: 'healthy', timestamp: new Date().toISOString(), initialized: this.state.initializationState.pocketbaseInitialized, authenticated: this.state.initializationState.isAuthenticated, discoveryMode: this.discoveryMode }; if (this.pb) { try { await this.pb.health.check(); status.pocketbase = 'healthy'; } catch (error) { status.pocketbase = 'unhealthy'; } } else { status.pocketbase = 'not initialized'; } return { content: [{ type: 'text', text: JSON.stringify(status, null, 2) }] }; } );
- src/agent-worker-compatible.ts:104-117 (handler)Handler logic for health_check in the WorkerCompatiblePocketBaseMCPAgent's CallToolRequestHandler switch statement. Returns basic health status.case "health_check": return { content: [ { type: "text", text: JSON.stringify({ status: "healthy", initialized: this.initialized, pocketbaseConnected: Boolean(this.pb), timestamp: new Date().toISOString() }, null, 2) } ] };
- Input schema definition for health_check tool in the list tools response for WorkerCompatiblePocketBaseMCPAgent.name: "health_check", description: "Check the health status of the MCP server", inputSchema: { type: "object", properties: {}, required: [] }
- dist/worker.js:112-131 (handler)Simplified health_check handler in the Cloudflare Worker entry point for quick health checks without full agent initialization.if (body.params?.name === 'health_check') { return new Response(JSON.stringify({ jsonrpc: '2.0', id: body.id, result: { content: [{ type: 'text', text: JSON.stringify({ server: 'healthy', timestamp: new Date().toISOString(), environment: 'cloudflare-worker' }, null, 2) }] } }), { headers: { 'Content-Type': 'application/json', 'Access-Control-Allow-Origin': '*' } });