Skip to main content
Glama

get_file_info

Retrieve metadata about a specific file within a remote zip archive by providing the archive URL and filename, enabling targeted file inspection without full download.

Instructions

Get information about a specific file in the remote zip archive.

Args: url: URL of the remote zip file filename: Name of the file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
filenameYes

Implementation Reference

  • The handler function for the 'get_file_info' MCP tool. It uses RemoteZip to get file info (size, compressed size) from a remote zip archive given URL and filename.
    @mcp.tool() async def get_file_info(url: str, filename: str) -> str: """Get information about a specific file in the remote zip archive. Args: url: URL of the remote zip file filename: Name of the file """ try: with RemoteZip(url) as zip_file: info = zip_file.getinfo(filename) return f"Filename: {info.filename}\nSize: {info.file_size} bytes\nCompressed size: {info.compress_size} bytes" except Exception as e: return f"Error getting file info: {str(e)}"

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/yuriyo/remotezip-mcp'

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