Skip to main content
Glama
AnshuML

Istedlal MCP Server

by AnshuML

search_files

Search files by metadata filters like filename, type, status, or date range to locate documents in projects. Supports pagination for efficient results management.

Instructions

Search files using metadata filters. Supports filters like filename, mime_type, processing_status, upload date range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tenant_idYes
project_idYes
filtersNo
pageNo
page_sizeNo

Implementation Reference

  • The main handler function that implements the search_files tool logic. It accepts tenant_id, project_id, filters, page, and page_size parameters and returns a paginated list of file summaries with metadata. Currently returns a mock/placeholder response.
    def search_files(
        tenant_id: str,
        project_id: str,
        filters: dict[str, Any] | None = None,
        page: int = 1,
        page_size: int = 20,
    ) -> dict[str, Any]:
        """
        Search files using metadata filters.
    
        Args:
            tenant_id: Tenant context
            project_id: Project context
            filters: Optional filters (filename, mime_type, processing_status, etc.)
            page: Page number for pagination
            page_size: Number of results per page
    
        Returns:
            List of file summaries and pagination info (placeholder)
        """
        # Phase 1: Mock response. Phase 2: Query via PostgreSQL provider.
        return {
            "files": [],
            "total_count": 0,
            "page": page,
            "page_size": page_size,
            "has_more": False,
        }
  • Registration of the search_files tool with the MCP server using @mcp.tool decorator. The wrapper function search_files_tool delegates to the imported search_files handler function.
    @mcp.tool(name="search_files")
    def search_files_tool(
        tenant_id: str,
        project_id: str,
        filters: dict | None = None,
        page: int = 1,
        page_size: int = 20,
    ) -> dict:
        """Search files using metadata filters. Supports filters like filename, mime_type, processing_status, upload date range."""
        return search_files(tenant_id, project_id, filters, page, page_size)
  • Module docstring and type import for the search_files tool. Defines the input/output types using Python typing (Any) for the filters dict parameter.
    """search_files tool - Search files using metadata filters."""
    from typing import Any

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