Skip to main content
Glama
Nizoka

pdfnative-mcp

Extract embedded files from PDF

extract_attachments
Read-onlyIdempotent

Extract embedded files from non-encrypted PDFs (PDF/A-3, Factur-X, ZUGFeRD). Returns metadata and decoded payload, with optional single-file or metadata-only extraction.

Instructions

Read-only extraction of embedded files from a non-encrypted PDF (PDF/A-3 / Factur-X / ZUGFeRD). Walks the catalog /Names → /EmbeddedFiles tree and returns each attachment's metadata (name, mimeType, AFRelationship, description, sizeBytes) plus, by default, its decoded payload as dataBase64. Completes the invoice round-trip: add_attachment → inspect_pdf → extract_attachments. Pass filename to pull a single named file, or includeData: false for a metadata-only probe. Encrypted PDFs are rejected with EXTRACTION_UNSUPPORTED.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoOptional dot-path projection applied to the structured result (e.g. ['attachments.name']). Composes after verbosity. Unknown paths are omitted.
filenameNoOptional exact attachment name to extract. When omitted, every embedded file is returned.
pdfBase64YesBase64-encoded PDF bytes to read embedded files from.
verbosityNoResponse verbosity. 'full' (default) returns the attachments[] array; 'summary' returns a token-frugal { attachmentCount } and drops the array.full
includeDataNoWhen true (default) each attachment carries its decoded payload as dataBase64. Set false for a metadata-only probe (names, sizes, relationships) with no payload bytes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
attachmentsYes
attachmentCountYes
Behavior5/5

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

The description discloses read-only nature, internal mechanism (walking the catalog tree), default behavior (including payloads), error handling (encrypted PDFs rejected), and parameter effects, adding significant value beyond the annotations.

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 a concise 5-sentence paragraph with no wasted words: it opens with purpose and constraints, explains mechanism, places in workflow, gives parameter hints, and notes error handling. Well-structured and front-loaded.

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

Completeness5/5

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

Given the tool's complexity (5 parameters, output schema exists), the description is complete: it covers constraints, error cases, parameter usage, and workflow integration. The output schema handles return value documentation, so no further detail needed.

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?

While the input schema already provides 100% coverage with descriptions, the description adds meaningful usage context by explaining how to use filename for single extraction and includeData for metadata-only probes, enhancing understanding beyond the schema.

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 extracts embedded files from a non-encrypted PDF, specifies the resource and verb, and distinguishes it from siblings like add_attachment by noting it is read-only and part of an invoice round-trip.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use the tool (for extracting embedded files from non-encrypted PDFs), when not (encrypted PDFs are rejected), and how to tailor usage via parameters like filename and includeData. It also contextualizes its place in a workflow.

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/Nizoka/pdfnative-mcp'

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