pdf_remove_password
Remove password protection from PDF files to enable access and editing. This tool processes password-protected PDFs from various sources including URLs, Google Drive, and Dropbox.
Instructions
Remove password protection from a PDF file.
Ref: https://developer.pdf.co/api-reference/pdf-password/remove.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 the PDF file to be removed. (Optional) | |
| name | No | File name for the generated output. (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/security.py:122-159 (handler)MCP tool registration via @mcp.tool(), input schema via Pydantic Fields, and handler logic that constructs ConversionParams and delegates to the remove_pdf_password service.@mcp.tool() async def pdf_remove_password( 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 the PDF file to be removed. (Optional)", default="" ), name: str = Field( description="File name for the generated output. (Optional)", default="" ), api_key: str = Field( description="PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)", default="", ), ) -> BaseResponse: """ Remove password protection from a PDF file. Ref: https://developer.pdf.co/api-reference/pdf-password/remove.md """ params = ConversionParams( url=url, httpusername=httpusername, httppassword=httppassword, password=password, name=name, ) return await remove_pdf_password(params, api_key=api_key)
- pdfco/mcp/services/pdf.py:109-113 (helper)Service helper function that performs the actual API request to the PDF.co /pdf/security/remove endpoint using the generic request function.async def remove_pdf_password( params: ConversionParams, api_key: str | None = None ) -> BaseResponse: return await request("pdf/security/remove", params, api_key=api_key)