Skip to main content
Glama
sifter-ai

sifter-mcp

Official

list_records

Retrieve paginated records from a sift. Provide sift_id, and optionally set limit, offset, or cursor to navigate results.

Instructions

Get extracted records from a sift.

Args:
    sift_id: The sift identifier
    limit: Maximum number of records to return (default 20, max 100)
    offset: Number of records to skip (ignored when cursor is provided)
    cursor: Opaque pagination cursor from a previous call's next_cursor field

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sift_idYes
limitNo
offsetNo
cursorNo

Implementation Reference

  • The MCP tool handler for 'list_records'. Decorated with @mcp.tool(), it takes sift_id, limit, offset, cursor params, gets the sift via AsyncSifter client, calls handle.find() for paginated results, and returns items, total, limit, offset, next_cursor.
    @mcp.tool()
    async def list_records(sift_id: str, limit: int = 20, offset: int = 0, cursor: str = "") -> dict:
        """Get extracted records from a sift.
    
        Args:
            sift_id: The sift identifier
            limit: Maximum number of records to return (default 20, max 100)
            offset: Number of records to skip (ignored when cursor is provided)
            cursor: Opaque pagination cursor from a previous call's next_cursor field
        """
        async with _get_client() as client:
            handle = await client.get_sift(sift_id)
            page = await handle.find(limit=min(limit, 100), cursor=cursor or None)
        return {"items": page.items, "total": page.total, "limit": page.limit, "offset": page.offset, "next_cursor": page.next_cursor}
  • The AgentToolRunner handler for 'list_records'. Fetches paginated records directly from SiftResultsService.get_results() and returns formatted result dict with id, filename, and extracted_data per record.
    if name == "list_records":
        limit = min(args.get("limit", 20), 100)
        offset = args.get("offset", 0)
        results, total = await self.results_svc.get_results(args["sift_id"], skip=offset, limit=limit)
        return {
            "total": total,
            "records": [{"id": r.id, "filename": r.filename, **r.extracted_data} for r in results],
        }
  • The JSON schema registration for 'list_records' in AGENT_TOOL_SCHEMAS. Defines the function name, description, and parameters (sift_id required, limit/offset optional with defaults).
    {
        "type": "function",
        "function": {
            "name": "list_records",
            "description": "Get a paginated list of extracted records from a sift.",
            "parameters": {
                "type": "object",
                "properties": {
                    "sift_id": {"type": "string", "description": "The sift identifier"},
                    "limit": {"type": "integer", "description": "Max records to return (default 20, max 100)"},
                    "offset": {"type": "integer", "description": "Records to skip for pagination"},
                },
                "required": ["sift_id"],
            },
        },
    },
  • The MCP tool is registered via the @mcp.tool() decorator on the list_records async function in the FastMCP server.
    @mcp.tool()
    async def list_records(sift_id: str, limit: int = 20, offset: int = 0, cursor: str = "") -> dict:
        """Get extracted records from a sift.
    
        Args:
            sift_id: The sift identifier
            limit: Maximum number of records to return (default 20, max 100)
            offset: Number of records to skip (ignored when cursor is provided)
            cursor: Opaque pagination cursor from a previous call's next_cursor field
        """
        async with _get_client() as client:
            handle = await client.get_sift(sift_id)
            page = await handle.find(limit=min(limit, 100), cursor=cursor or None)
        return {"items": page.items, "total": page.total, "limit": page.limit, "offset": page.offset, "next_cursor": page.next_cursor}
  • The SiftResultsService.get_results() helper method that queries MongoDB for paginated sift results by sift_id with skip/limit support.
    async def get_results(
        self,
        sift_id: str,
        skip: int = 0,
        limit: int = 50,
    ) -> tuple[list[SiftResult], int]:
        query: dict = {"sift_id": sift_id}
        total = await self.col.count_documents(query)
        cursor = self.col.find(query).skip(skip).limit(limit)
        docs = await cursor.to_list(length=limit)
        return [SiftResult.from_mongo(d) for d in docs], total
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses pagination behavior, including that offset is ignored when cursor is provided, and defaults/max limits. This is good but could mention read-only nature explicitly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, well-structured with an Args section, and every sentence adds value with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While parameter usage is well-covered, the description omits the return format or structure (e.g., what fields records contain). Since no output schema exists, this information would be helpful for completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds substantial meaning beyond the input schema: explains cursor/offset interaction, provides max for limit, and clarifies cursor origin. Schema coverage is 0%, but the description compensates fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get extracted records from a sift,' specifying the action (Get), resource (extracted records), and source (sift). It lacks explicit differentiation from siblings like find_records or query_sift, but the purpose is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as find_records or query_sift. The description only explains parameters, not usage context or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/sifter-ai/sifter'

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