Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

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
NameRequiredDescriptionDefault
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.
httpusernameNoHTTP auth user name if required to access source url. (Optional)
httppasswordNoHTTP auth password if required to access source url. (Optional)
passwordNoPassword of the PDF file to be removed. (Optional)
nameNoFile name for the generated output. (Optional)
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)

Implementation Reference

  • 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)
  • 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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose critical behavioral traits like whether this is a destructive/mutative operation, authentication requirements beyond parameters, rate limits, error conditions, or what happens to the original file. The external reference link suggests additional documentation exists but isn't integrated into the description itself.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just two sentences, front-loading the core purpose. The reference link adds context without cluttering the main description. However, the second sentence could be more integrated rather than just a reference.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that performs a potentially destructive operation (password removal) with 6 parameters and no output schema or annotations, the description is incomplete. It doesn't explain what the tool returns, error handling, security implications, or integration with sibling tools like 'upload_file' for local files. The external reference partially compensates but isn't self-contained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter information beyond what's already in the schema (which has 100% coverage). It doesn't explain parameter relationships, provide examples, or clarify semantics like how the 'password' parameter interacts with the removal process. The baseline score of 3 reflects adequate schema coverage but no added value from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Remove password protection') and resource ('from a PDF file'), distinguishing it from sibling tools like 'pdf_add_password' which performs the opposite operation. It provides a direct, unambiguous purpose statement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. While it references an external API documentation link, it doesn't explicitly state prerequisites, when-not-to-use scenarios, or compare with related tools like 'pdf_add_password' or 'upload_file' for file handling.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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