Skip to main content
Glama
sifter-ai

sifter-mcp

Official

run_extraction

Enqueue an extraction job to structure a document into typed, queryable records using a specified sift.

Instructions

Enqueue extraction for a document on a specific sift.

Args:
    document_id: The document identifier
    sift_id: The sift to extract with

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
document_idYes
sift_idYes

Implementation Reference

  • The main tool handler for 'run_extraction' as a FastMCP tool. It takes document_id and sift_id, gets the sift handle, and calls handle.extract(document_id) to enqueue extraction.
    @mcp.tool()
    async def run_extraction(document_id: str, sift_id: str) -> dict:
        """Enqueue extraction for a document on a specific sift.
    
        Args:
            document_id: The document identifier
            sift_id: The sift to extract with
        """
        async with _get_client() as client:
            handle = await client.get_sift(sift_id)
            return await handle.extract(document_id)
  • The @mcp.tool() decorator on line 229 registers the 'run_extraction' function as an MCP tool on the FastMCP server instance 'mcp'.
    mcp = FastMCP("sifter", streamable_http_path="/", stateless_http=True, transport_security=_transport_security)
  • Zapier integration action definition for 'run_extraction' — sends a POST to /api/sifts/{sift_id}/extract with the document_id to trigger extraction.
    const actionRunExtraction = {
      key: "run_extraction",
      noun: "Extraction",
      display: {
        label: "Run Extraction",
        description: "Trigger extraction of a document against a sift.",
      },
      operation: {
        inputFields: [
          { key: "sift_id", label: "Sift", dynamic: "sift_choices.id.name", required: true },
          { key: "document_id", label: "Document ID", required: true },
        ],
        perform: async (z, bundle) => {
          const resp = await z.request({
            method: "POST",
            url: `${apiUrl(bundle)}/api/sifts/${bundle.inputData.sift_id}/extract`,
            headers: headers(bundle),
            body: { document_id: bundle.inputData.document_id },
          });
          return resp.data;
        },
        sample: { task_id: "sample-task-id", status: "queued" },
      },
    };
  • Registration of the run_extraction action in the Zapier app's actions export.
    actions: {
      [actionUploadDocument.key]: actionUploadDocument,
      [actionCreateSift.key]: actionCreateSift,
      [actionRunExtraction.key]: actionRunExtraction,
    },
  • Input schema for the run_extraction action — requires sift_id (dynamic dropdown) and document_id (text).
    inputFields: [
      { key: "sift_id", label: "Sift", dynamic: "sift_choices.id.name", required: true },
      { key: "document_id", label: "Document ID", required: true },
    ],
Behavior2/5

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

With no annotations, the description carries the full burden. It hints at asynchronous behavior ('enqueue') but does not disclose side effects, permissions, or whether the operation is reversible.

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

Conciseness4/5

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

The description is very concise with a single sentence plus parameter breakdown. It is front-loaded and free of extraneous words, though it could be better structured.

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

Completeness2/5

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

For a simple tool with two parameters and no output schema, the description lacks context such as prerequisites, error conditions, or when it should be used among many sibling tools.

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?

Parameter descriptions are minimal ('The document identifier', 'The sift to extract with'). Since schema description coverage is 0%, the description should compensate but adds little beyond parameter names.

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?

The description clearly states the action ('enqueue extraction') and the resources involved ('document' and 'sift'). It distinguishes from sibling tools like 'get_extraction_status' and 'upload_document' by specifying a unique operation.

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 when extraction should be enqueued versus checking status or uploading documents.

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