Skip to main content
Glama

get_file_info

Retrieve metadata about specific files within remote zip archives using URL and filename inputs to access file details without full archive downloads.

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
filenameYes
urlYes

Implementation Reference

  • The handler function for the 'get_file_info' tool, decorated with @mcp.tool(). It retrieves metadata (filename, size, compressed size) for a specific file within a remote ZIP archive using the RemoteZip library.
    @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)}"
  • The @mcp.tool() decorator registers the get_file_info function as an MCP tool.
    @mcp.tool()
  • Type hints and docstring define the input schema (url: str, filename: str) and output (str describing file info).
    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 """

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