Skip to main content
Glama
pdfdotco

PDF.co MCP Server

Official
by pdfdotco

extract_attachments

Extract attached files from a PDF document. Specify the source PDF URL to retrieve all embedded attachments.

Instructions

Extracts attachments from a source PDF file.
Ref: https://developer.pdf.co/api-reference/pdf-extract-attachments.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to the source PDF file.
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 `extract_pdf_attachments` helper function that calls the PDF.co API endpoint 'pdf/attachments/extract' using the shared HTTP client. This is the actual API call implementation.
    async def extract_pdf_attachments(
        params: ConversionParams, api_key: str | None = None
    ) -> BaseResponse:
        return await request("pdf/attachments/extract", params, api_key=api_key)
Behavior2/5

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

With no annotations, the description carries the full burden but only states the function. Missing details like side effects, error conditions, performance implications, or what happens if no attachments are found.

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 very concise (two sentences plus a link). While it could be slightly more structured, it wastes no words and front-loads the core purpose.

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?

Without an output schema, the description should clarify return values (e.g., list of attachments or content). It also lacks usage context and error handling, making it incomplete for a 5-parameter tool.

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?

Schema coverage is 100%, so the schema already documents parameters. The description adds no additional meaning beyond the parameter descriptions, meeting the baseline but not exceeding it.

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 action (extracts) and the resource (attachments from a source PDF file). It distinguishes itself from sibling tools, most of which convert or manipulate PDFs, not specifically extract attachments.

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?

No guidance on when to use this tool vs alternatives like pdf_split or pdf_to_text. The description lacks any context about prerequisites, when to avoid, or which scenarios are appropriate.

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