pdf_remove_password
Remove password protection from a PDF file using a secure URL or uploaded file. Access the unlocked PDF for editing or sharing without restrictions.
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 |
|---|---|---|---|
| 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) | |
| name | No | File name for the generated output. (Optional) | |
| password | No | Password of the PDF file to be removed. (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/security.py:122-159 (handler)MCP tool handler function for 'pdf_remove_password', decorated with @mcp.tool() which registers it. Defines input schema using Pydantic Field descriptions. Prepares ConversionParams and delegates to remove_pdf_password service function.@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 invokes the PDF.co API endpoint '/v1/pdf/security/remove' via the generic 'request' function to remove password from PDF.async def remove_pdf_password( params: ConversionParams, api_key: str | None = None ) -> BaseResponse: return await request("pdf/security/remove", params, api_key=api_key)