PDF Spec (PDF Agent Stack)

v0.14.0
io.github.shuji-bonji/pdf-spec-mcp Checked 7 hours ago Published 26 days ago

Look up ISO 32000 (PDF) clauses, requirements and terms.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_specs List available specifications

List all available PDF specification documents. Returns document IDs, titles, page counts, and categories, plus `coverage.gaps` — the normative areas this corpus does NOT contain (PDF/A, PAdES). Read the gaps before concluding that a requirement does not exist. Use the returned IDs as the `spec` parameter in other tools. `unrecognizedFiles` names the PDFs in PDF_SPEC_DIR that no pattern recognised — they were NOT read. Every other tool returns the id of the spec it read as `spec` (the default when `spec` was omitted); compare_versions returns `specs`.

ParameterTypeDescription
categorystringFilter by category (standard, ts, pdfua, guide, appnote).

get_structure Get section hierarchy

Get the section hierarchy of the PDF specification (ISO 32000-2). Returns the table of contents with section numbers, titles, and page numbers.

ParameterTypeDescription
max_depthintegerMaximum heading depth to return (1-10).
specstringSpec ID (e.g. "iso32000-2", "pdf17"). Omit for the default spec.

get_section Get section content

Get the content of a specific section from the PDF specification (ISO 32000-2). Returns structured content including headings, paragraphs, lists, tables, and notes. A parent section returns its entire subtree (all subsections, in document order); top-level clauses can therefore return very large responses — prefer the most specific section number you know.

ParameterTypeDescription
section *stringSection number, e.g. "12.5.6.10" or "Annex A".
specstringSpec ID (e.g. "iso32000-2", "pdf17"). Omit for the default spec.

search_spec Search the specification

Search the PDF specification (ISO 32000-2) for a keyword or phrase. Returns matching sections with context snippets. The first call may take a few seconds to build the search index; it is then cached on disk, so later processes start warm. No hits means "this corpus cannot answer", NOT "no such requirement exists" — ISO 19005 (PDF/A) and ETSI PAdES are outside it (see list_specs -> coverage.gaps).

ParameterTypeDescription
query *stringSearch terms. Matched as an exact phrase first, then as AND over the words.
max_resultsintegerMaximum hits to return (1-50).
specstringSpec ID (e.g. "iso32000-2", "pdf17"). Omit for the default spec.

get_requirements Extract normative requirements

Reads the STANDARD, not your file. Extract normative requirements (shall/must/may) from the PDF specification (ISO 32000-2). Returns structured requirements with the sentence context, section, and requirement level. It tells you what the specification requires, never whether a given PDF satisfies it — to check a file, use pdf-verify-mcp (validate_conformance / evaluate_policy).

ParameterTypeDescription
levelstringFilter by requirement level (shall, shall not, should, should not, may).
sectionstringLimit to this section and its subsections.
specstringSpec ID (e.g. "iso32000-2", "pdf17"). Omit for the default spec.

get_definitions Get term definitions

Get term definitions from the "Terms and definitions" clause of the PDF specification (clause 3 of ISO 32000-2, clause 4 of ISO 32000-1 / pdf17). Returns structured definitions with term, definition text, notes, and sources.

ParameterTypeDescription
specstringSpec ID (e.g. "iso32000-2", "pdf17"). Omit for the default spec.
termstringFilter to definitions matching this term.

get_tables Extract tables

Extract table structures from a specified section of the PDF specification (ISO 32000-2). Returns tables with headers, rows, and optional captions. A parent section returns the tables of its entire subtree (all subsections).

ParameterTypeDescription
section *stringSection number containing the table(s).
specstringSpec ID (e.g. "iso32000-2", "pdf17"). Omit for the default spec.
table_indexintegerReturn only this table (0-based). Omit for all tables in the section.

compare_versions Compare PDF 1.7 and PDF 2.0

Compare sections between PDF 1.7 (ISO 32000-1) and PDF 2.0 (ISO 32000-2). Returns matched sections (same or moved), added sections (new in 2.0), and removed sections (absent in 2.0). Uses title-based automatic matching.

ParameterTypeDescription
sectionstringLimit the comparison to this section subtree.