health_check
Monitor and verify the operational status of the PocketBase MCP server to ensure reliable database interactions and system performance.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/agent-cloudflare.ts:210-233 (handler)Handler function for the 'health_check' tool. Returns JSON status including server health, timestamp, agent state, PocketBase connection, and available services (Stripe, Email). No input parameters required.this.server.tool( "health_check", "Check the health status of the MCP server and PocketBase connection", {}, async () => { const status = { server: 'healthy', timestamp: new Date().toISOString(), state: this.state, pocketbase: this.pb ? 'connected' : 'not initialized', services: { stripe: Boolean(this.stripeService), email: Boolean(this.emailService) } }; return { content: [{ type: 'text', text: JSON.stringify(status, null, 2) }] }; } );
- src/agent-simple.ts:316-347 (handler)Handler function for the 'health_check' tool in the simple agent. Performs actual PocketBase health check, includes initialization and auth status. Returns JSON with detailed status.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/worker.ts:573-583 (handler)Simplified direct handler for 'health_check' tool in Cloudflare Worker entrypoint. Returns basic server health status for the worker environment.case 'health_check': return { content: [{ type: 'text', text: JSON.stringify({ server: 'healthy', timestamp: new Date().toISOString(), environment: 'cloudflare-worker' }, null, 2) }] };