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
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional) | |
| httppassword | No | HTTP auth password if required to access source url. (Optional) | |
| httpusername | No | HTTP auth user name if required to access source url. (Optional) | |
| password | No | Password of PDF file. (Optional) | |
| url | Yes | 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. |
Implementation Reference
- pdfco/mcp/tools/apis/form.py:8-8 (registration)The @mcp.tool() decorator registers the 'read_pdf_forms_info' tool.@mcp.tool()
- pdfco/mcp/tools/apis/form.py:9-39 (handler)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)
- pdfco/mcp/tools/apis/form.py:10-26 (schema)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:
- pdfco/mcp/services/pdf.py:26-29 (helper)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)