Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

read_pdf_forms_info

Extract details of fillable fields from PDF forms to understand structure and layout. Supports PDF files via URL, Google Drive, Dropbox, or local uploads. Simplifies form analysis and integration workflows.

Instructions

Extracts information about fillable PDF fields from an input PDF file. Ref: https://developer.pdf.co/api-reference/forms/info-reader.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)
passwordNoPassword of 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 @mcp.tool() decorator registers the 'read_pdf_forms_info' tool.
    @mcp.tool()
  • The main handler function implementing the tool logic, including input schema via Pydantic Fields.
    async def read_pdf_forms_info( 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="", ), password: str = Field(description="Password of 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: """ Extracts information about fillable PDF fields from an input PDF file. Ref: https://developer.pdf.co/api-reference/forms/info-reader.md """ params = ConversionParams( url=url, httpusername=httpusername, httppassword=httppassword, password=password, ) return await get_pdf_form_fields_info(params, api_key=api_key)
  • Input parameters with Pydantic Field descriptions defining the tool schema.
    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="", ), password: str = Field(description="Password of 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:
  • Supporting helper function that performs the actual API call to retrieve PDF form fields information.
    async def get_pdf_form_fields_info( params: ConversionParams, api_key: str | None = None ) -> BaseResponse: return await request("pdf/info/fields", 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