Skip to main content
Glama

pdf_attachments

Extract embedded files from PDFs, including e-invoice XML and attached CSVs, as JSON or ZIP. Use before parsing invoice PDFs to get reliable structured data.

Instructions

Pull embedded files out of a PDF (local path): ZUGFeRD/Factur-X e-invoice XML, attached CSVs, images or sub-PDFs. Returns JSON by default (text inline, binary base64, e-invoice attachments flagged) or a ZIP of everything. Use this before parsing an invoice PDF – the structured XML inside is far more reliable than reading the printed page. $0.01.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
nameNoOnly this attachment, by filename
outputNojson → attachment list with contents; zip → all attachments as one archivejson
output_pathNo
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden. It discloses the default JSON return format, how text vs binary attachments are encoded, e-invoice flagging, the ZIP alternative, and the $0.01 cost. It does not mention edge cases like no-attachment results or output_path behavior, but the core operation is transparent.

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?

Three sentences carry high information density: what it extracts, what it returns, and when to use it. The pricing is tacked on at the end without filler. Every sentence earns its place and the key action is front-loaded.

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

Completeness4/5

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

For a tool with no output schema and no annotations, the description covers the required parameter, return format, and primary use case well enough to call it correctly. It falls slightly short of complete because it leaves output_path and idempotency_key semantics unexplained and does not describe no-attachment behavior, but these are secondary to the main extraction workflow.

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 coverage is only 40%, and the description partially compensates by explaining 'local path' for file and adding JSON/zip output semantics. However, output_path and idempotency_key remain unexplained in both schema and description, and the name parameter relies solely on its schema description. Some value is added, but not enough to fully cover the gaps.

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 opens with a specific verb and resource: 'Pull embedded files out of a PDF (local path)'. It also enumerates concrete attachment types (ZUGFeRD/Factur-X XML, CSVs, images, sub-PDFs), which makes the tool's scope unambiguous and distinguishes it from siblings like pdf_to_markdown or pdf_extract_tables.

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 a clear, explicit when-to-use instruction: 'Use this before parsing an invoice PDF – the structured XML inside is far more reliable than reading the printed page.' It does not name alternatives or state when not to use it, so it stops short of a full 5, but the context is strong.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.