PDF-Tools AGENTS.md

A repository instruction file describing project rules, active PDF work, available PDF tools, and commands for building and testing them.

In plain words
What is it for?
Use it when working on the PDF Tools repository, especially its PDF reading, filling, validation, extraction, and packaging code.
Why use it?
It gives coding agents the project-specific context needed to continue work consistently and avoid missing required handoffs or mirrored files.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/open-document-alliance/pdf-tools/agents-md
Clone the repo
git clone --depth 1 https://github.com/Open-Document-Alliance/PDF-Tools

Made for: Codex, OpenCode.

Per session 2,777 This file is loaded in full into every session.
When invoked 2,777 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02777 $0.02777
Opus 5 $0.01388 $0.01388
Sonnet 5 $0.00555 $0.00555
Haiku 4.5 $0.00278 $0.00278

Measured 3d ago against content hash da826f631c88, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

PDF-Tools AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 231 lines

How it starts

The opening of the file, as written. The whole thing — 231 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Repository Guidelines

Active Kepano / Shannon Work

Before continuing the current extraction-improvement tranche, read docs/handoffs/KEPANO_SHANNON.md. The crucial starting fact is that Kepano's example is Shannon's A Mathematical Theory of Communication PDF; it is not a separate example to locate.

Project Structure & Module Organization

  • server/index.js: Node MCP server exposing PDF tools shared by Claude Desktop and Cursor. Keep tool definitions and helper utilities here; prefer incremental updates over rewrites.
  • pdf-toolkit-mcp-share/: Packaged variant used by package-for-friend.js; mirror changes from server/index.js when APIs evolve.
  • manifest.json and index.html: Claude Desktop extension metadata and UI stub. Update versions alongside package.json.
  • example-fw9.pdf: Sample form for smoke tests. Keep anonymized assets only.

Tools currently shipped

This is the complete registered set, not a selection.

  • display_pdf, list_pdfs, read_pdf_fields, fill_pdf, bulk_fill_from_csv, save_profile, load_profile, list_profiles, fill_with_profile, extract_to_csv, validate_pdf, read_pdf_content, read_pdf_pages, read_pdf_layout, search_pdf_text, convert_pdf_to_markdown, verify_table_proposal, get_pdf_identity, get_pdf_info, get_page_analysis, inspect_pdf_accessibility, compare_pdfs, render_pdf_page, render_pdf_region, fetch_pdf_from_url, merge_pdfs, split_pdf, rotate_pdf_pages, reorder_pdf_pages, apply_page_plan, create_signature, list_signatures, load_signature, detect_signature_zones, add_signature_field, prepare_signing_packet, apply_signature, apply_text, get_active_document, set_active_document, get_allowed_directories, get_pdf_resource_uri, reveal_in_finder, read_pdf_bytes (app-only).

get_pdf_info returns bounded source-bound observations. Widget annotations belong to form fields; ordinary annotations remain separate and their targets are returned only as inert values. Render tools bind PNG and, when native canvas is available, raw RGBA digests to the exact source SHA-256. Render-region inputs are top-left PDF.js viewport points after CropBox, rotation, and UserUnit, not MediaBox-relative signing coordinates. The macOS system renderer uses the same view mapping for whole pages and regions and reports raw pixels unavailable.

Read the full file on GitHub · 231 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 231 lines · 2,777 tokens per session scan A da826f631c88

Subscribe to this mod's changes

PDF-Tools AGENTS.md is an instructions file published in the GitHub repository Open-Document-Alliance/PDF-Tools (153 stars, last pushed 9d ago), licensed MIT. It adds 2,777 tokens to every session, about $0.0139 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.