PDF processing pipeline
Full PDF processing pipeline - metadata, markdown conversion, and first-page extraction in one call.
3 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.
When to use this pack
An agent receives a PDF URL and needs to understand it quickly: what's the page count and metadata, what does the full text say (as markdown), and what's on page 1? Running three separate tools is three payments; this pack does it in one.
Tools in this pack
All 3 run inside the single $0.060 call above. Each is also callable on its own if you only need one part.
- PDF info POST /api/pdf-info Inspect a PDF without downloading the whole thing into your model: page count, title, author, subject, creator, producer, creation/modification dates, encryption flag, and byte size. Body: {"url":"https://…/file.pdf"}.
- PDF to Markdown POST /api/pdf-to-markdown Convert a PDF to clean markdown: headings, paragraphs, and bullets reconstructed from the text layer - ready to drop into a model's context. Body: {"url":"https://…/file.pdf"}.
- Extract / split PDF pages POST /api/pdf-extract-pages Pull a subset of pages into a new PDF (split). Body: {"url":"https://…/file.pdf","pages":"1-3,5"}. Returns the new PDF as base64.
Workflow
- Call pdf-info to get page count, file size, title, author, and other metadata.
- Call pdf-to-markdown to convert the entire PDF to clean markdown text.
- Call pdf-extract-pages with pages='1' to get just the first page as a separate document.
Call it directly
Any x402 client pays the 402 and gets the whole workflow back in one response:
npx agent402-client call pdf-pipeline {"url":"https://arxiv.org/pdf/1706.03762"}
Run it in Claude
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Process the PDF at https://arxiv.org/pdf/1706.03762 using Agent402's pdf-pipeline skill pack: (1) pdf-info for metadata, (2) pdf-to-markdown for full text, (3) pdf-extract-pages for page 1. Summarize the document structure and first-page content.