Skip to main content
Glama
gemini-dk

Firebase MCP Server

by gemini-dk

storage_get_file_info

Retrieve file metadata and download URL from Firebase Storage by specifying the file path.

Instructions

Get file information including metadata and download URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesThe path of the file to get information for

Implementation Reference

  • The core handler function that retrieves file metadata and generates a signed download URL from Firebase Storage.
    export async function getFileInfo(filePath: string): Promise<{ content: { type: string , text: string }[] }> {
      const file = admin.storage().bucket().file(filePath);
      const [metadata] = await file.getMetadata();
      const [url] = await file.getSignedUrl({
        action: 'read',
        expires: Date.now() + 1000 * 60 * 60 // 1 hour
      });
      const result = { metadata, downloadUrl:url };
      return {
        content: [
          { type:'text', text: JSON.stringify(result,null,2) }
        ]
      };
    }
  • src/index.ts:209-222 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    {
      "name": "storage_get_file_info",
      "description": "Get file information including metadata and download URL",
      "inputSchema": {
        "type": "object",
        "properties": {
          "filePath": {
            "type": "string",
            "description": "The path of the file to get information for"
          }
        },
        "required": ["filePath"]
      }
    }
  • Dispatch case in the CallToolRequestHandler switch statement that invokes the getFileInfo handler.
    case 'storage_get_file_info':
      return getFileInfo(args.filePath as string);
  • Input schema definition for the storage_get_file_info tool.
    "inputSchema": {
      "type": "object",
      "properties": {
        "filePath": {
          "type": "string",
          "description": "The path of the file to get information for"
        }
      },
      "required": ["filePath"]
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get file information' implies a read-only operation, it doesn't explicitly state whether this requires authentication, what happens if the file doesn't exist (error behavior), rate limits, or what specific metadata fields are returned. The mention of 'download URL' is useful but insufficient for full transparency.

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 extremely concise at just 8 words, front-loading the core purpose immediately. Every word earns its place by specifying what information is retrieved (metadata and download URL), with zero redundant or unnecessary content.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is incomplete. It doesn't explain what metadata fields are returned, the format of the download URL, error conditions, or authentication requirements. While concise, it leaves too many behavioral aspects unspecified for a tool that presumably interacts with storage systems.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'filePath' clearly documented in the schema as 'The path of the file to get information for'. The description doesn't add any additional parameter semantics beyond what the schema already provides, so it meets the baseline for high schema coverage.

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 verb 'Get' and the resource 'file information', specifying what metadata and download URL are included. It distinguishes this from sibling tools like storage_list_files (which lists files) and firestore operations, but doesn't explicitly differentiate from other potential 'get info' tools beyond the storage context.

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. It doesn't mention when to use storage_get_file_info versus storage_list_files (which lists files) or firestore_get_document (which gets document data), nor does it specify prerequisites like authentication or file existence requirements.

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/gemini-dk/mcp-server-firebase'

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