Skip to main content
Glama

PDF.co MCP Server

Official
by pdfdotco
MIT License
1
  • Apple
  • Linux

pdf_add_annotations_images_fields

Add annotations, images, and fields to PDFs, including text, shapes, links, and form filling. Modify PDFs and scanned documents with customizable properties for text, fonts, positioning, and more.

Instructions

Add text, images, forms, other PDFs, fill forms, links to external sites and external PDF files. You can update or modify PDF and scanned PDF files. This tool supports three main ways to add content: 1. **annotations**: Add text, links, shapes, etc. Properties: text, x, y, size, pages, color, link, fontName, fontItalic, fontBold, fontStrikeout, fontUnderline 2. **images**: Add images or other PDF content Properties: url, x, y, width, height, pages 3. **fields**: Fill existing form fields Properties: fieldName, pages, text, fontName, size, fontBold, fontItalic, fontStrikeout, fontUnderline Example annotations: [{"text": "Sample Text - Click here to test link", "x": 250, "y": 240, "size": 24, "pages": "0-", "color": "CCBBAA", "link": "https://pdf.co/", "fontName": "Comic Sans MS", "fontItalic": true, "fontBold": true, "fontStrikeout": false, "fontUnderline": true}] Example images: [{"url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png", "x": 270, "y": 150, "width": 159, "height": 43, "pages": "0"}] Example fields: [{"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]", "pages": "1", "text": "Joan B.", "fontName": "Arial", "size": 6, "fontBold": true, "fontItalic": true, "fontStrikeout": true, "fontUnderline": true}] Ref: https://developer.pdf.co/api-reference/pdf-add.md

Input Schema

NameRequiredDescriptionDefault
annotationsNoArray of annotation objects to add text, links, shapes, etc. Each object can have: 'text' (string), 'x' (number), 'y' (number), 'size' (number), 'pages' (string), 'color' (string hex), 'link' (string URL), 'fontName' (string), 'fontItalic' (boolean), 'fontBold' (boolean), 'fontStrikeout' (boolean), 'fontUnderline' (boolean). (Optional)
api_keyNoPDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)
encryptNoEncrypt output file. (Optional)
expirationNoSet the expiration time for the output link in minutes. After this specified duration, any generated output file(s) will be automatically deleted. (Optional)
fieldsNoArray of form field objects to fill PDF form fields. Each object can have: 'fieldName' (string), 'pages' (string), 'text' (string), 'fontName' (string), 'size' (number), 'fontBold' (boolean), 'fontItalic' (boolean), 'fontStrikeout' (boolean), 'fontUnderline' (boolean). (Optional)
flattenNoFlatten filled form fields and annotations into PDF content. Set to true to disable editing of filled form fields in the output PDF. (Optional)
httppasswordNoHTTP auth password if required to access source url. (Optional)
httpusernameNoHTTP auth user name if required to access source url. (Optional)
imagesNoArray of image objects to add images to PDF. Each object can have: 'url' (string), 'x' (number), 'y' (number), 'width' (number), 'height' (number), 'pages' (string). (Optional)
nameNoFile name for the generated output. (Optional)
passwordNoPassword for the PDF file. (Optional)
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.

Input Schema (JSON Schema)

{ "properties": { "annotations": { "default": [], "description": "Array of annotation objects to add text, links, shapes, etc. Each object can have: 'text' (string), 'x' (number), 'y' (number), 'size' (number), 'pages' (string), 'color' (string hex), 'link' (string URL), 'fontName' (string), 'fontItalic' (boolean), 'fontBold' (boolean), 'fontStrikeout' (boolean), 'fontUnderline' (boolean). (Optional)", "items": {}, "title": "Annotations", "type": "array" }, "api_key": { "default": null, "description": "PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)", "title": "Api Key", "type": "string" }, "encrypt": { "default": false, "description": "Encrypt output file. (Optional)", "title": "Encrypt", "type": "boolean" }, "expiration": { "default": 60, "description": "Set the expiration time for the output link in minutes. After this specified duration, any generated output file(s) will be automatically deleted. (Optional)", "title": "Expiration", "type": "integer" }, "fields": { "default": [], "description": "Array of form field objects to fill PDF form fields. Each object can have: 'fieldName' (string), 'pages' (string), 'text' (string), 'fontName' (string), 'size' (number), 'fontBold' (boolean), 'fontItalic' (boolean), 'fontStrikeout' (boolean), 'fontUnderline' (boolean). (Optional)", "items": {}, "title": "Fields", "type": "array" }, "flatten": { "default": false, "description": "Flatten filled form fields and annotations into PDF content. Set to true to disable editing of filled form fields in the output PDF. (Optional)", "title": "Flatten", "type": "boolean" }, "httppassword": { "default": "", "description": "HTTP auth password if required to access source url. (Optional)", "title": "Httppassword", "type": "string" }, "httpusername": { "default": "", "description": "HTTP auth user name if required to access source url. (Optional)", "title": "Httpusername", "type": "string" }, "images": { "default": [], "description": "Array of image objects to add images to PDF. Each object can have: 'url' (string), 'x' (number), 'y' (number), 'width' (number), 'height' (number), 'pages' (string). (Optional)", "items": {}, "title": "Images", "type": "array" }, "name": { "default": "", "description": "File name for the generated output. (Optional)", "title": "Name", "type": "string" }, "password": { "default": "", "description": "Password for the PDF file. (Optional)", "title": "Password", "type": "string" }, "url": { "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.", "title": "Url", "type": "string" } }, "required": [ "url" ], "type": "object" }

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