read_pdf_forms_info
Extract fillable PDF form field details from a PDF file to identify editable elements and their properties for data processing.
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 |
|---|---|---|---|
| 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. | |
| httpusername | No | HTTP auth user name if required to access source url. (Optional) | |
| httppassword | No | HTTP auth password if required to access source url. (Optional) | |
| password | No | Password of PDF file. (Optional) | |
| api_key | No | PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional) |
Implementation Reference
- pdfco/mcp/tools/apis/form.py:8-39 (handler)The primary handler for the 'read_pdf_forms_info' tool. Decorated with @mcp.tool() for registration, defines input schema via pydantic Fields, and delegates to the helper function.@mcp.tool() 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/services/pdf.py:26-29 (helper)Core helper function that makes the HTTP request to the PDF.co API endpoint 'pdf/info/fields' to fetch 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)