Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

find_table

Extract tables and their coordinates from PDF documents using a specified URL. Supports public links, password-protected files, and selective page ranges for precise data retrieval.

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
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
httppasswordNoHTTP auth password if required to access source url. (Optional)
httpusernameNoHTTP auth user name 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)
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.

Implementation Reference

  • The handler function for the 'find_table' tool, decorated with @mcp.tool(name="find_table"). Defines input schema using Pydantic Field descriptions and handles parameter preparation before delegating to find_table_in_pdf.
    @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 performs the actual API request to the PDF.co 'pdf/find/table' endpoint using the shared request function.
    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)

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