Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

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
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 PDF file. (Optional)
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)

Implementation Reference

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

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool extracts information about fillable PDF fields, implying a read-only operation, but doesn't clarify if it requires authentication, has rate limits, or what the output format looks like (e.g., structured data or raw text). The reference URL hints at external documentation, but the description itself lacks critical behavioral details for safe and effective use.

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 concise with two sentences: one stating the purpose and one providing a reference URL. It's front-loaded with the core functionality, and the reference adds context without unnecessary elaboration. However, the reference URL could be considered slightly extraneous if not essential for tool use, but it doesn't significantly detract from clarity.

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?

Given the complexity of extracting PDF field information, no annotations, and no output schema, the description is incomplete. It doesn't explain what the extracted information includes (e.g., field names, types, positions), how errors are handled, or any limitations (e.g., file size constraints). With 5 parameters and behavioral unknowns, this leaves significant gaps for an AI agent to use the tool effectively.

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 input schema has 100% description coverage, with detailed explanations for all 5 parameters (e.g., 'url' supports various sources, 'httpusername' and 'httppassword' for HTTP auth, 'password' for PDF encryption, 'api_key' for authentication). The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Extracts information about fillable PDF fields from an input PDF file.' This specifies the verb ('extracts'), resource ('fillable PDF fields'), and input ('input PDF file'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'pdf_info_reader' or 'find_text', which might have overlapping functionality.

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. It mentions a reference URL but doesn't explain scenarios where this tool is appropriate compared to siblings like 'pdf_info_reader' (which might extract general PDF info) or 'find_text' (which might search for text in PDFs). There's no mention of prerequisites or exclusions, leaving the agent to infer usage from the purpose alone.

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