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"] }

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