get-database-info
Retrieve general information about a connected Firebird database, including version, size, and configuration details.
Instructions
Retrieves general information about the connected Firebird database.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/database.ts:700-732 (handler)The handler function for 'get-database-info' tool. It fetches the list of tables and gathers database connection info from environment variables, then formats and returns the information.handler: async () => { logger.info("Getting database information"); try { const tables = await listTables(); const info = { database: process.env.DB_NAME || 'unknown', host: process.env.DB_HOST || 'localhost', port: process.env.DB_PORT || 3050, totalTables: tables.length, driverType: process.env.USE_NATIVE_DRIVER === 'true' ? 'native' : 'pure-js', wireEncryption: process.env.WIRE_CRYPT || 'Disabled', tables: tables }; return { content: [{ type: "text", text: formatForClaude(info) }] }; } catch (error) { const errorResponse = wrapError(error); logger.error(`Error getting database info: ${errorResponse.error}`); return { content: [{ type: "text", text: formatForClaude(errorResponse) }] }; }
- src/tools/database.ts:119-119 (schema)Zod schema for input arguments of the 'get-database-info' tool. No parameters required.export const GetDatabaseInfoArgsSchema = z.object({});
- src/tools/database.ts:694-734 (registration)Registration of the 'get-database-info' tool in the setupDatabaseTools function's tools Map, including name, title, description, schema, and handler.// Nueva herramienta: get-database-info tools.set("get-database-info", { name: "get-database-info", title: "Get Database Info", description: "Retrieves general information about the connected Firebird database.", inputSchema: GetDatabaseInfoArgsSchema, handler: async () => { logger.info("Getting database information"); try { const tables = await listTables(); const info = { database: process.env.DB_NAME || 'unknown', host: process.env.DB_HOST || 'localhost', port: process.env.DB_PORT || 3050, totalTables: tables.length, driverType: process.env.USE_NATIVE_DRIVER === 'true' ? 'native' : 'pure-js', wireEncryption: process.env.WIRE_CRYPT || 'Disabled', tables: tables }; return { content: [{ type: "text", text: formatForClaude(info) }] }; } catch (error) { const errorResponse = wrapError(error); logger.error(`Error getting database info: ${errorResponse.error}`); return { content: [{ type: "text", text: formatForClaude(errorResponse) }] }; } } });