Skip to main content
Glama

Get Database Info

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)
                    }]
                };
            }
        }
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'retrieves' information, implying a read-only operation, but does not specify what 'general information' includes, potential permissions needed, or any side effects like performance impact. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema), the description is adequate but lacks depth. It does not explain what 'general information' entails or provide context about the database connection, which could be helpful for an agent. With no annotations, it meets the minimum viable threshold but has clear gaps in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description does not need to add parameter semantics, and it appropriately avoids unnecessary details, earning a high baseline score for this dimension.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Retrieves') and the target ('general information about the connected Firebird database'), which is specific and unambiguous. However, it does not explicitly differentiate from siblings like 'get-server-info' or 'get-table-data', which might retrieve different types of information, so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as 'get-server-info' for server-level details or 'describe-table' for table-specific information. It lacks explicit context or exclusions, leaving usage implied rather than clarified.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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