Skip to main content
Glama
AnshuML

Istedlal MCP Server

by AnshuML

get_file_metadata

Fetch metadata for files in Istedlal MCP Server by ID to access details like filename, mime_type, size, and processing status.

Instructions

Fetch metadata for a specific file by ID. Returns file details including filename, mime_type, size, processing_status, and storage info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYes
tenant_idYes
project_idYes

Implementation Reference

  • The core handler function that implements the get_file_metadata tool logic. Takes file_id, tenant_id, and project_id as parameters and returns a dictionary with file metadata including filename, mime_type, size, processing status, and storage info. Currently returns mock/placeholder data.
    def get_file_metadata(file_id: str, tenant_id: str, project_id: str) -> dict[str, Any]:
        """
        Fetch metadata for a specific file.
    
        Args:
            file_id: Unique identifier of the file
            tenant_id: Tenant context for authorization
            project_id: Project context for authorization
    
        Returns:
            File metadata object (placeholder until DB provider is connected)
        """
        # Phase 1: Return mock data. Phase 2: Call PostgreSQL provider.
        return {
            "file_id": file_id,
            "tenant_id": tenant_id,
            "project_id": project_id,
            "filename": "placeholder.txt",
            "mime_type": "text/plain",
            "size_bytes": 0,
            "processing_status": "pending",
            "upload_timestamp": None,
            "storage_uri": None,
        }
  • Registration of the get_file_metadata tool with the MCP (Model Context Protocol) server. The @mcp.tool decorator registers the function with the specified name, and the wrapper function delegates to the actual handler implementation.
    @mcp.tool(name="get_file_metadata")
    def get_file_metadata_tool(
        file_id: str,
        tenant_id: str,
        project_id: str,
    ) -> dict:
        """Fetch metadata for a specific file by ID. Returns file details including filename, mime_type, size, processing_status, and storage info."""
        return get_file_metadata(file_id, tenant_id, project_id)

Tool Definition Quality

Score is being calculated. Check back soon.

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/AnshuML/MCP'

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