Skip to main content
Glama
sifter-ai

sifter-mcp

Official

get_sift

Access the metadata and inferred extraction schema for a sift, revealing the typed fields and structure for querying document records as a database.

Instructions

Get sift metadata and inferred extraction schema for a specific sift.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sift_idYes

Implementation Reference

  • MCP tool handler for get_sift. Decorated with @mcp.tool(), this async function takes a sift_id, creates an AsyncSifter client, fetches the sift handle via the SDK, and returns its metadata dict.
    @mcp.tool()
    async def get_sift(sift_id: str) -> dict:
        """Get sift metadata and inferred extraction schema for a specific sift."""
        async with _get_client() as client:
            handle = await client.get_sift(sift_id)
        return handle._data if hasattr(handle, "_data") else {"sift_id": sift_id}
  • The get_sift function is registered implicitly via the @mcp.tool() decorator on a FastMCP instance named 'sifter'. This line creates that FastMCP instance.
    mcp = FastMCP("sifter", streamable_http_path="/", stateless_http=True, transport_security=_transport_security)
  • Helper function that creates an AsyncSifter client instance, used by get_sift and all other tool handlers.
    def _get_client() -> AsyncSifter:
        api_key = _request_api_key.get() or _env_api_key
        if not api_key:
            raise RuntimeError("SIFTER_API_KEY environment variable is required")
        return AsyncSifter(api_url=_api_url, api_key=api_key)
  • SDK-level async get_sift method on AsyncSifter class. Makes an HTTP GET request to /api/sifts/{sift_id} and wraps the response in an AsyncSiftHandle.
    async def get_sift(self, sift_id: str) -> AsyncSiftHandle:
        async with httpx.AsyncClient() as http:
            r = await http.get(
                f"{self.api_url}/api/sifts/{sift_id}",
                headers=self._auth_headers(),
            )
            r.raise_for_status()
            return AsyncSiftHandle(r.json(), self)
  • Type signature acts as schema — takes sift_id (str), returns a dict. No explicit Pydantic model; FastMCP derives from the type hints.
    @mcp.tool()
    async def get_sift(sift_id: str) -> dict:
        """Get sift metadata and inferred extraction schema for a specific sift."""
Behavior3/5

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

No annotations provided, so description carries full burden. It indicates a read operation but lacks details on error conditions, rate limits, or what happens if sift_id is invalid. Adequate for a simple get operation but not rich.

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?

Single sentence, no waste, front-loaded with action and resource. Highly concise and well-structured.

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?

Given the tool's simplicity (one parameter, no output schema), the description is minimally complete. It covers purpose and input but omits return format and edge cases. Adequate but not thorough.

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

Parameters2/5

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

Schema description coverage is 0%, yet the description does not explain the sift_id parameter beyond its name. The description adds no semantic value over the parameter name, failing to compensate for missing schema descriptions.

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

Purpose5/5

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

Description clearly states action 'Get', resource 'sift metadata and inferred extraction schema', and specificity 'for a specific sift'. It effectively distinguishes from sibling tools like list_sifts and query_sift.

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

Usage Guidelines3/5

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

No explicit guidance on when to use this tool vs alternatives. While the purpose is implied, there is no when-not-to-use or alternative mention, making it minimally adequate.

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