Skip to main content
Glama
pdf4me
by pdf4me

add_attachment_to_pdf

Attach one or more local files to a PDF by specifying the source PDF path and a list of attachment file paths to embed.

Instructions

Embed one or more files as attachments into a PDF using the PDF4me AddAttachmentToPdf API. Provide the path to the source PDF and a list of local file paths to attach (docName is each file's basename). Optional: request_doc_name for the API docName field (defaults to the PDF's filename) and output path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
output_dirNo
pdf_file_pathYes
output_file_nameNo
request_doc_nameNo
attachment_file_pathsYes
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It explains the core action and mentions the API, but it does not disclose whether the original PDF is modified or a new file is created, permissions required, side effects, or output behavior. This is a significant gap for a mutation tool.

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 front-loaded with the main action. It includes necessary parameter guidance without redundancy. Slightly dense due to parentheticals, but overall efficient.

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

Completeness3/5

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

The tool has 5 parameters and no output schema, and the description covers the required inputs but lacks details about default output behavior, overwrite semantics, and return values. It is adequate for a simple API wrapper but leaves notable gaps for an agent to fully understand the tool's behavior.

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 description coverage is 0%, so the description must compensate. It explains pdf_file_path and attachment_file_paths clearly, and it adds meaning for request_doc_name and "output path." However, it does not explicitly describe output_dir or output_file_name, leaving some parameters under-specified.

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 tool's function: "Embed one or more files as attachments into a PDF" — a specific verb and resource. It distinguishes from siblings like add_barcode_to_pdf and extract_attachment_from_pdf, which are different operations.

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

Usage Guidelines4/5

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

The description gives clear how-to instructions: "Provide the path to the source PDF and a list of local file paths to attach." It also clarifies optional parameters. However, it does not explicitly mention when to choose this over alternatives, nor does it state exclusions or prerequisites.

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/pdf4me/pdf4me-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server