list_connections
Retrieve all configured DBeaver database connections to access and query multiple database types through existing setups.
Instructions
List all available DBeaver database connections
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeDetails | No | Include detailed connection information |
Implementation Reference
- src/index.ts:579-606 (handler)The primary handler function that executes the list_connections tool. It parses all DBeaver connections using configParser and returns either full details or a simplified list based on the includeDetails parameter.private async handleListConnections(args: { includeDetails?: boolean }) { const connections = await this.configParser.parseConnections(); if (args.includeDetails) { return { content: [{ type: 'text' as const, text: JSON.stringify(connections, null, 2), }], }; } const simplified = connections.map(conn => ({ id: conn.id, name: conn.name, driver: conn.driver, host: conn.host, database: conn.database, folder: conn.folder })); return { content: [{ type: 'text' as const, text: JSON.stringify(simplified, null, 2), }], }; }
- src/index.ts:196-205 (schema)The input schema definition for the list_connections tool, specifying an optional boolean parameter includeDetails.inputSchema: { type: 'object', properties: { includeDetails: { type: 'boolean', description: 'Include detailed connection information', default: false } } },
- src/index.ts:193-205 (registration)The tool registration in the ListToolsRequestSchema response, defining name, description, and input schema for list_connections.{ name: 'list_connections', description: 'List all available DBeaver database connections', inputSchema: { type: 'object', properties: { includeDetails: { type: 'boolean', description: 'Include detailed connection information', default: false } } },
- src/index.ts:481-482 (registration)The dispatch case in the CallToolRequestSchema handler that routes list_connections calls to the handleListConnections method.case 'list_connections': return await this.handleListConnections(args as { includeDetails?: boolean });