discover_tools
Explore and manage PocketBase database tools within the MCP server for schema operations, data manipulation, and advanced database interactions.
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": "discover_tools"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/agent-simple.ts:351-392 (handler)Handler function for 'discover_tools' tool that returns a JSON list of all registered tools with their availability status based on server initialization state.
this.server.tool( 'discover_tools', { description: 'List all available tools and their current status' }, async () => { const tools = []; tools.push({ name: 'health_check', status: 'available', description: 'Health check tool' }); tools.push({ name: 'discover_tools', status: 'available', description: 'Tool discovery' }); // PocketBase tools const pbStatus = this.state.initializationState.pocketbaseInitialized ? 'available' : 'requires_initialization'; ['list_collections', 'get_collection', 'list_records', 'get_record', 'create_record'].forEach(toolName => { tools.push({ name: toolName, status: pbStatus, description: `PocketBase ${toolName.replace(/_/g, ' ')}` }); }); return { content: [{ type: 'text', text: JSON.stringify({ totalTools: tools.length, availableTools: tools.filter(t => t.status === 'available').length, tools: tools }, null, 2) }] }; } ); - src/agent-cloudflare.ts:258-305 (handler)Handler function for 'discover_tools' tool that dynamically lists available tools categorized by system, pocketbase, stripe, and email services based on initialization.
this.server.tool( "discover_tools", "List all available tools and their current status", {}, async () => { const tools = [ { name: 'health_check', status: 'available', category: 'system' }, { name: 'smithery_discovery', status: 'available', category: 'system' }, { name: 'discover_tools', status: 'available', category: 'system' } ]; // Add PocketBase tools if (this.state.pocketbaseInitialized) { const pbTools = [ 'list_collections', 'get_collection', 'create_collection', 'list_records', 'get_record', 'create_record', 'update_record', 'delete_record', 'query_records', 'authenticate_user' ]; pbTools.forEach(tool => { tools.push({ name: tool, status: 'available', category: 'pocketbase' }); }); } // Add service tools if (this.stripeService) { ['create_customer', 'create_payment_intent'].forEach(tool => { tools.push({ name: tool, status: 'available', category: 'stripe' }); }); } if (this.emailService) { ['send_email'].forEach(tool => { tools.push({ name: tool, status: 'available', category: 'email' }); }); } return { content: [{ type: 'text', text: JSON.stringify({ totalTools: tools.length, availableTools: tools.filter(t => t.status === 'available').length, tools: tools }, null, 2) }] }; } );