server_info
Retrieve information about the db-mcp server and its registered database adapters to understand available database connections and configurations.
Instructions
Get information about the db-mcp server and registered adapters
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/McpServer.ts:99-124 (handler)Handler function for the 'server_info' tool. It iterates over registered database adapters, collects their info, and returns a JSON string containing server name, version, transport type, list of adapters, and tool filter summary.() => { const adapterInfo = []; for (const [id, adapter] of this.adapters) { adapterInfo.push({ id, ...adapter.getInfo() }); } return { content: [{ type: 'text' as const, text: JSON.stringify({ name: this.config.name, version: this.config.version, transport: this.config.transport, adapters: adapterInfo, toolFilter: { raw: this.toolFilter.raw, enabledCount: this.toolFilter.enabledTools.size } }, null, 2) }] }; } );
- src/server/McpServer.ts:95-124 (registration)Registration of the 'server_info' tool on the MCP server using the deprecated server.tool method. Includes name, description, empty input schema, and inline handler function.this.server.tool( 'server_info', 'Get information about the db-mcp server and registered adapters', {}, () => { const adapterInfo = []; for (const [id, adapter] of this.adapters) { adapterInfo.push({ id, ...adapter.getInfo() }); } return { content: [{ type: 'text' as const, text: JSON.stringify({ name: this.config.name, version: this.config.version, transport: this.config.transport, adapters: adapterInfo, toolFilter: { raw: this.toolFilter.raw, enabledCount: this.toolFilter.enabledTools.size } }, null, 2) }] }; } );