Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
pdf_extract_textA

Extract text content from a PDF file. Returns first 10 pages by default to avoid exceeding LLM context limits. Use the 'pages' parameter for specific pages.

pdf_get_metadataA

Get metadata from a PDF file including title, author, subject, page count, creation/modification dates, and producer information.

pdf_get_form_fieldsA

List all form fields in a PDF with their names, types, current values, and required status. Returns hasForm: false for PDFs without forms.

pdf_to_markdownA

Convert a PDF to clean, reading-order Markdown for LLM consumption: reconstructs up to 2 content columns (plus full-width title/footer bands), infers headings from font size, and detects bullet/numbered lists. Pages with 3 or more columns fall back to single-column reading order. Tables are emitted as plain reading-order text, NOT reconstructed as Markdown tables. Best on clean, digital (text-based) PDFs; degrades on scanned/image-only PDFs (use pdf_render_pages for those) and very complex layouts. Returns the first 10 pages by default.

pdf_searchA

Search text across a PDF and return matches with a short surrounding snippet and the page number. The query is matched as a literal substring (case-insensitive by default). Searches all pages unless a range is given.

pdf_mergeA

Merge multiple PDF files into one. AcroForm fields are preserved; fields whose names collide across inputs are auto-renamed (namespaced by source). Set flatten:true to bake field values into static content.

pdf_splitA

Extract specific pages from a PDF into a new file. AcroForm fields on the extracted pages are preserved; fields on omitted pages are dropped. Set flatten:true to bake field values into static content.

pdf_rotate_pagesA

Rotate pages in a PDF by 90, 180, or 270 degrees. Rotation is additive to any existing rotation. Rotates all pages if no page range is specified.

pdf_encryptA

Encrypt a PDF with AES-256 password protection. Requires a user password to open. Owner password controls editing permissions (defaults to the user password).

pdf_compareA

Compare two PDFs page by page (by absolute page index) and report text differences. Returns identical:true when text matches. Diffs content-stream-order text (not visual reading order), so it is best for same-layout documents; reflowed or multi-column PDFs produce noisy diffs. Inserting/deleting a page shifts all later pages and reports them as changed. Large diffs are trimmed (truncated:true) to fit the response limit.

pdf_add_page_numbersB

Add page numbers to a PDF. Supports configurable position, format, starting number, and font size.

pdf_embed_qr_codeA

Embed a QR code or barcode into a specific page of a PDF at given coordinates. Supports qrcode, code128, datamatrix, ean13, pdf417, and azteccode.

pdf_reorder_pagesA

Reorder pages in a PDF. Specify the new page order as a comma-separated string (e.g. '3,1,2'). Duplicates are allowed. AcroForm fields are preserved. Set flatten:true to bake field values into static content.

pdf_delete_pagesA

Delete specific pages from a PDF, keeping the rest in their original order. AcroForm fields on the remaining pages are preserved. Set flatten:true to bake field values into static content. Cannot delete every page.

pdf_createA

Create a new PDF from text content with automatic line wrapping and page overflow. Supports A4, Letter, and Legal page sizes. Provide fontPath for non-Latin text (Arabic, CJK, etc.).

pdf_fill_formA

Fill form fields in a PDF. Supports text, checkbox, dropdown, radio, and list-box (multi-select) fields. Provide fontPath for non-Latin text (Arabic, CJK, etc.).

pdf_add_watermarkB

Add a text watermark to PDF pages. Watermark is centered and rotated diagonally by default. Applies to all pages if no page range is specified.

pdf_embed_imageA

Embed a PNG or JPEG image into a specific page of a PDF. Supports custom positioning and optional scaling with aspect ratio preservation.

pdf_create_from_markdownA

Create a rich, high-fidelity PDF from Markdown (CommonMark + GFM). Supports headings, bold/italic, links, ordered/bullet lists, tables, fenced code blocks, blockquotes, and horizontal rules.

pdf_create_from_templateA

Create a polished PDF from a named template (invoice, report, or letter). Pass structured data matching the template's fields; data is validated against the template's schema.

pdf_flattenA

Flatten a PDF's form fields, baking their current values into the page content and removing interactivity. Form-less PDFs are copied unchanged.

pdf_render_pagesA

Render PDF pages to images so a vision-capable client can read scanned or image-only PDFs. Writes PNG/JPEG files and returns their paths; set inline:true to return image blocks the model can see directly.

Prompts

Interactive templates invoked by user choice

NameDescription
create-invoiceParse invoice details and generate a structured call to pdf_create_from_template.
fill-formGuide a two-step workflow: discover form fields, then fill them.
read-scanned-pdfGuide reading a scanned or image-only PDF by rendering its pages for vision, with a fallback to text extraction for digital PDFs.
pdf-to-markdownGuide converting a PDF into structured Markdown, then optionally summarizing it.
merge-and-flattenGuide merging multiple PDFs into one and flattening any form fields into static content.

Resources

Contextual data attached and managed by the client

NameDescription
PDF templatesThe templates available to pdf_create_from_template, each with its accepted JSON fields.

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/AryanBV/pdf-toolkit-mcp'

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