Skip to main content
Glama
pdf4me
by pdf4me

add_margin_to_pdf

Add custom margins to a PDF by providing a file path and optional millimeter values for left, right, top, and bottom. The modified PDF is saved to disk.

Instructions

Add margins to a PDF using the PDF4me AddMargin API. Provide a local PDF path and optional margins in millimeters (margin_left/right/top/bottom, 0-100). Saves the resulting PDF to disk.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
margin_topNo
output_dirNo
margin_leftNo
margin_rightNo
margin_bottomNo
pdf_file_pathYes
output_file_nameNo
request_doc_nameNo
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the side effect of saving the resulting PDF to disk and references the PDF4me API, implying an external call. However, it omits details about potential file overwrites, error behavior, or network requirements, leaving some behavioral traits undisclosed.

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

Conciseness5/5

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

The description is two sentences, front-loaded with the main purpose, followed by additional usage details. Every sentence contributes value without repetition or fluff, achieving high conciseness.

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?

Given the tool has 8 parameters, no annotations, and no output schema, the description is not fully complete. It covers the core functionality and main parameters but leaves gaps around request_doc_name, output file naming behavior, error handling, and exact output location. It is adequate but not thorough for a tool of this complexity.

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

Parameters4/5

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

The schema has 0% description coverage, so the description must add meaning. It explains the key parameters: 'local PDF path' for pdf_file_path, and 'optional margins in millimeters (margin_left/right/top/bottom, 0-100)' for the four margin parameters, including a range. It also indirectly suggests output_dir/output_file_name via 'Saves the resulting PDF to disk.' However, request_doc_name remains unexplained, preventing a perfect score.

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 with a specific verb and resource: 'Add margins to a PDF.' It distinguishes itself from sibling tools (e.g., add_attachment_to_pdf, add_barcode_to_pdf) by focusing solely on margin manipulation, leaving no ambiguity about its purpose.

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 provides clear context: it specifies the input (local PDF path) and the optional nature of margins, implying when to use this tool (when PDF margins need adjustment). However, it does not explicitly mention alternatives or exclusions, though the sibling tools are sufficiently distinct to avoid confusion.

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