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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"filePath": "<filePath>"
},
"name": "storage_get_file_info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | The path of the file to get information for |
Implementation Reference
- src/lib/firebase/storageClient.ts:58-71 (handler)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"] } } - src/index.ts:258-259 (handler)Dispatch case in the CallToolRequestHandler switch statement that invokes the getFileInfo handler.
case 'storage_get_file_info': return getFileInfo(args.filePath as string); - src/index.ts:212-221 (schema)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"] }