Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

find_table

Locate tables within PDF documents and retrieve their precise coordinates for data extraction or analysis.

Instructions

Find tables in PDF and get their coordinates.
Ref: https://developer.pdf.co/api-reference/pdf-find/table.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.
httpusernameNoHTTP auth user name if required to access source url. (Optional)
httppasswordNoHTTP auth password if required to access source url. (Optional)
pagesNoComma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'. The first-page index is 0. (Optional)
passwordNoPassword of the PDF file. (Optional)
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)

Implementation Reference

  • The primary handler for the 'find_table' MCP tool. Includes registration via @mcp.tool decorator, input schema definition using pydantic Field descriptions, parameter processing into ConversionParams, and delegation to the find_table_in_pdf helper.
    @mcp.tool(name="find_table")
    async def find_table(
        url: str = Field(
            description="URL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files."
        ),
        httpusername: str = Field(
            description="HTTP auth user name if required to access source url. (Optional)",
            default="",
        ),
        httppassword: str = Field(
            description="HTTP auth password if required to access source url. (Optional)",
            default="",
        ),
        pages: str = Field(
            description="Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'. The first-page index is 0. (Optional)",
            default="",
        ),
        password: str = Field(
            description="Password of the PDF file. (Optional)", default=""
        ),
        api_key: str = Field(
            description="PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)",
            default="",
        ),
    ) -> BaseResponse:
        """
        Find tables in PDF and get their coordinates.
        Ref: https://developer.pdf.co/api-reference/pdf-find/table.md
        """
        params = ConversionParams(
            url=url,
            httpusername=httpusername,
            httppassword=httppassword,
            pages=pages,
            password=password,
        )
    
        return await find_table_in_pdf(params, api_key=api_key)
  • Helper function that executes the core logic by making an asynchronous request to the PDF.co API endpoint for finding tables in PDFs.
    async def find_table_in_pdf(
        params: ConversionParams, api_key: str | None = None
    ) -> BaseResponse:
        return await request("pdf/find/table", params, api_key=api_key)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions finding tables and getting coordinates, but does not describe key traits: whether this is a read-only operation, potential side effects (e.g., API rate limits), authentication needs (implied by 'api_key' parameter but not stated), or output format (coordinates structure). This is inadequate for a tool with multiple parameters and no output schema.

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 concise and front-loaded with the core purpose in the first sentence. The second sentence provides a reference link, which is useful but could be integrated more seamlessly. Overall, it avoids unnecessary verbosity, though it could be slightly more structured (e.g., separating usage notes).

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?

Given the tool's complexity (6 parameters, no annotations, no output schema), the description is incomplete. It lacks details on behavioral aspects (e.g., read-only vs. destructive), output expectations (what 'coordinates' entail), and integration context (e.g., using 'upload_file' for local files, as hinted in the schema but not in the description). This leaves significant gaps for effective tool invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly (e.g., 'url' for PDF source, 'pages' for page ranges). The description adds no additional meaning beyond the schema, such as clarifying how coordinates are derived or usage examples. With high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate but also does not detract.

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 the tool's purpose: 'Find tables in PDF and get their coordinates.' It specifies the verb ('find'), resource ('tables in PDF'), and output ('coordinates'), which is specific and actionable. However, it does not explicitly differentiate from sibling tools like 'find_text' or 'pdf_to_csv', which might also involve PDF content extraction, so it misses full sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It lacks context such as prerequisites (e.g., needing a PDF file via URL), comparisons to siblings like 'find_text' for text extraction or 'pdf_to_csv' for table conversion, or exclusions (e.g., not for editing PDFs). This leaves the agent without usage direction.

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/pdfdotco/pdfco-mcp'

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