Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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) }] }; }
  • Zod schema for input arguments of the 'get-database-info' tool. No parameters required.
    export const GetDatabaseInfoArgsSchema = z.object({});
  • 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) }] }; } } });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PuroDelphi/mcpFirebird'

If you have feedback or need assistance with the MCP directory API, please join our Discord server