{"service":"bim-pdf-worker","version":"0.1.0","routes":[{"method":"POST","path":"/info","description":"PDF metadata and attachment list"},{"method":"POST","path":"/pages","description":"Page dimensions in PDF points"},{"method":"POST","path":"/pack","description":"Embed JSON sidecars into a PDF"},{"method":"POST","path":"/extract","description":"Extract sidecars from a bim-pdf"},{"method":"POST","path":"/list","description":"List embedded file attachments"},{"method":"POST","path":"/search","description":"Query elements and marks by class, id, level, or page"},{"method":"POST","path":"/enrich","description":"Marks with element data merged inline for agent consumption"},{"method":"POST","path":"/summary","description":"Compact overview: project info, element counts, page dimensions"},{"method":"POST","path":"/levels","description":"Distinct level names with element counts from elements.json"},{"method":"POST","path":"/annots","description":"List native PDF annotations (comments, markups, stamps) by page"},{"method":"POST","path":"/text","description":"Extract text content from PDF pages (Latin-1/UTF-16BE; no CMap support)"},{"method":"POST","path":"/merge","description":"Merge multiple PDFs into one (send multiple pdf fields)"},{"method":"POST","path":"/split","description":"Extract pages from a PDF by page spec (e.g. \"1,3,5-7\")"},{"method":"POST","path":"/validate","description":"Validate a bim-pdf: schema correctness, cross-references, class registry"},{"method":"POST","path":"/bookmarks","description":"Extract PDF outline (table of contents / bookmarks) with page numbers"},{"method":"POST","path":"/rotate","description":"Rotate PDF pages by 90/180/270 degrees (pages: \"all\" or \"1,3,5-7\")"},{"method":"POST","path":"/meta","description":"PDF document metadata: title, author, creator, producer, creation date"},{"method":"POST","path":"/form-fields","description":"Extract AcroForm field names, types, and values (text, checkbox, select, signature)"},{"method":"POST","path":"/stamp","description":"Add text stamp/watermark to pages (text, position, size, color, opacity, rotation)"},{"method":"POST","path":"/form-fill","description":"Fill AcroForm fields by name (JSON object); optional flatten to freeze values"},{"method":"POST","path":"/crop","description":"Crop pages to a rectangle in PDF points (x0,y0,x1,y1; bottom-left origin)"},{"method":"POST","path":"/attach-remove","description":"Remove embedded file attachment(s) from a PDF by filename"},{"method":"POST","path":"/annot-add","description":"Add a text annotation (sticky note) to a page at PDF-point coordinates"},{"method":"POST","path":"/annot-remove","description":"Remove annotations from pages (all or by subtype: Text, Highlight, Stamp, etc.)"},{"method":"POST","path":"/optimize","description":"Reduce PDF file size via object stream compression (reports size before/after)"},{"method":"POST","path":"/decrypt","description":"Remove password protection by rewriting PDF without encryption"},{"method":"POST","path":"/page-reorder","description":"Reorder pages by explicit spec (preserves order, allows duplicates); e.g. pages=\"3,1,2\""},{"method":"POST","path":"/page-delete","description":"Delete specified pages; keeps all others (inverse of /split)"},{"method":"POST","path":"/bookmark-set","description":"Write PDF outline (table of contents) from JSON array [{title, page}]; replaces existing"},{"method":"POST","path":"/text-search","description":"Search for a string across all pages; returns matching pages with context excerpts"},{"method":"POST","path":"/highlight-add","description":"Add a highlight annotation to a rectangular region on a page (x0,y0,x1,y1; bottom-left origin)"},{"method":"POST","path":"/image-insert","description":"Embed a PNG or JPEG image onto a page at specified coordinates (x,y,width,height in PDF points)"},{"method":"POST","path":"/attach-add","description":"Embed one or more files as PDF attachments (EmbeddedFiles names tree; any file type)"},{"method":"POST","path":"/metadata-set","description":"Write PDF document metadata: title, author, subject, keywords, creator (Info dictionary)"},{"method":"POST","path":"/pages-insert","description":"Insert blank pages at specified positions (after/before; comma-separated 1-indexed page numbers)"},{"method":"POST","path":"/mcp","description":"MCP JSON-RPC 2.0 endpoint (tools: bim_pdf_summary, search, enrich, pages, extract, bookmarks)"}]}