PreteWorks API
Measured conclusion: Deep-tested. L2 outcome: tools_ok.
One key for the document-to-web pipeline: scrape, AI-extract, build & edit PDFs, fill forms.
| Author | com.preteworks |
|---|---|
| Access | remote |
| Publisher key required | No |
| Measured state | Deep-tested |
| L1 liveness | alive |
| L1 latency | 2887 ms |
| Last measured | 2026-10-24 |
Add to your agent
Copy this into your MCP client config:
{
"mcpServers": {
"PreteWorks API": {
"url": "https://api.preteworks.com/mcp",
"transport": "streamable-http"
}
}
}
Measured tools (29)
render_html_to_pdfRender a full HTML document to a PDF. External subresources are blocked for safety — inline images/fonts as data: URIs. Returns a file_id (for chaining) and a ~1h download URL.
Parameters:
html(required) — string — The complete HTML document to render.
Hints: read-only no · destructive no · idempotent not declared · open-world no
number_pdfStamp a page number on every page. position: bottom-center (default) | bottom-left | bottom-right | top-center | top-left | top-right. format supports {n} and {total}. Returns a file_id + ~1h URL.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.start— number — First page's number (default 1).format— string — e.g. '{n}' or '{n} / {total}' (default '{n}').position— string — Where to place it (default bottom-center).
Hints: read-only no · destructive no · idempotent not declared · open-world no
pdf_inforead-onlyRead a PDF's metadata (title, author, subject, keywords, creator, producer, dates) plus page count and page size, as JSON.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world no
set_pdf_metadataSet a PDF's title, author, subject, keywords (array or comma string) and/or creator. Only the fields you provide change. Returns a file_id + ~1h URL.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.title— stringauthor— stringcreator— stringsubject— stringkeywords
Hints: read-only no · destructive no · idempotent not declared · open-world no
render_documentRender a structured document to a PDF from a named template (invoice, receipt, report). Money/totals are computed for you. Returns a file_id (for chaining) and a ~1h download URL.
Parameters:
template(required) — string — Document template.data(required) — object — Template data. invoice/receipt: {seller:{name,address?,email?,logo_url?(data: URI)}, buyer?:{name,address?,email?}, number?, issued?/date?, due?, currency?, items:[{description,qty,unit_price}], tax_rate?, notes?, terms?}; receipt also takes amount_paid?, payment_method?. report: {title, subtitle?, author?, date?, sections:[{heading?,body?}]}. Money is computed server-side.
Hints: read-only no · destructive no · idempotent not declared · open-world no
merge_pdfsCombine 2+ PDFs into a single PDF, in the order given. Inputs are file_ids (from prior tools) or base64 PDFs. Returns a file_id (for chaining) and a ~1h download URL.
Parameters:
pdfs(required) — array — 2+ PDF sources. Each: A file_id from a prior tool result, or a base64-encoded PDF.
Hints: read-only no · destructive no · idempotent not declared · open-world no
select_pagesKeep only the specified pages of a PDF (e.g. [1,3,5]) and drop the rest, preserving order. Returns a file_id (for chaining) and a ~1h download URL.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.pages(required) — string — Pages to keep, e.g. '1,3,5-7'.
Hints: read-only no · destructive no · idempotent not declared · open-world no
rotate_pdfRotate every page of a PDF by 90, 180, or 270 degrees (clockwise). Returns a file_id (for chaining) and a ~1h download URL.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.degrees(required) — number — 90, 180, or 270.
Hints: read-only no · destructive no · idempotent not declared · open-world no
watermark_pdfStamp a diagonal grey text watermark (e.g. "DRAFT", "CONFIDENTIAL") across every page of a PDF. Returns a file_id (for chaining) and a ~1h download URL.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.text(required) — string — The watermark text.
Hints: read-only no · destructive no · idempotent not declared · open-world no
extract_pdf_textread-onlyExtract the text content of a PDF — for RAG, summarization, or search. Accepts a file_id (from a prior tool) or a base64-encoded PDF, and returns the text inline. Not OCR: a scanned/image-only PDF returns little or no text.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world no
images_to_pdfCombine PNG/JPEG images (base64) into a PDF, one image per page. Returns a file_id and a ~1h URL.
Parameters:
images(required) — array — Base64-encoded PNG/JPEG images, one per page (max 20).
Hints: read-only no · destructive no · idempotent not declared · open-world no
markdown_to_pdfRender Markdown to a clean, print-styled PDF. Returns a file_id and a ~1h URL.
Parameters:
markdown(required) — string — The Markdown to render.title— string — Document title.
Hints: read-only no · destructive no · idempotent not declared · open-world no
split_pdfSplit a PDF into multiple PDFs — one per page by default, or by page ranges like '1-3;4-6'. Returns a file_id + URL per part.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.ranges— string — e.g. '1-3;4-6'. Omit to split every page.
Hints: read-only no · destructive no · idempotent not declared · open-world no
read_pdf_formread-onlyList a PDF's form fields (name, type, value, options) as JSON.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world no
fill_pdf_formFill a PDF's form fields from a map of field -> value; optionally flatten. Returns a file_id and a ~1h URL.
Parameters:
pdf(required) — string — A file_id from a prior tool result, or a base64-encoded PDF.fields(required) — object — Map of field name to value.flatten— boolean — Flatten the form after filling (default false).
Hints: read-only no · destructive no · idempotent not declared · open-world no
file_to_markdownread-onlyConvert a Word (.docx), Excel (.xlsx) or CSV file (base64) into clean Markdown — for RAG, agents and pipelines. DOCX keeps headings/lists/tables; spreadsheets become Markdown tables (one per sheet). Returns Markdown inline. Optional 'format' (docx|xlsx|csv) overrides auto-detection.
Parameters:
file(required) — string — Base64-encoded .docx, .xlsx or .csv file.format— string — Optional format hint; auto-detected if omitted.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world no
data_to_spreadsheetTurn rows of data into a downloadable XLSX (default) or CSV. 'rows' is an array of objects (keys → header row) or an array of arrays (first row is the header). Returns a file_id (for chaining) and a ~1h download URL.
Parameters:
rows(required) — array — Array of objects (keys→columns) or array of arrays (first row = header).format— string — Output format (default xlsx).sheet_name— string — Worksheet name (default 'Sheet1').
Hints: read-only no · destructive no · idempotent not declared · open-world no
batch_scraperead-onlyFetch up to 10 public URLs and return each as clean Markdown, in one call — for research/RAG over several pages at once. Private/internal hosts are blocked.
Parameters:
urls(required) — array — 1–10 http/https URLs.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
crawl_siteread-onlyFetch a URL plus up to 7 more same-origin pages it links to (≤8 total), each as clean Markdown. Bounded and synchronous. Private/internal hosts are blocked.
Parameters:
url(required) — string — The root http/https URL.limit— integer — Max pages incl. root (default 5, max 8).
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
map_siteread-onlyDiscover the same-origin URLs linked from a page — the site map, with no page content fetched. Private/internal hosts are blocked.
Parameters:
url(required) — string — The http/https URL to map.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
extract_dataread-onlyExtract specified fields from a web page, PDF, or Office file as JSON, using AI. Provide 'fields' plus ONE source: a 'url', a 'pdf' (file_id or base64), or a 'file' (base64 .docx/.xlsx/.csv). Returns a JSON object mapping each field to its value, or null when absent.
Parameters:
fields(required) — array — Field names to extract, e.g. ['invoice total','due date'].pdf— string — A file_id from a prior tool result, or a base64-encoded PDF.url— string — A public http/https URL to read.file— string — A base64-encoded .docx, .xlsx or .csv file (converted to text first).
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
summarize_documentread-onlySummarize a web page, PDF, Office file (.docx/.xlsx/.csv), or raw text using AI. Provide ONE source: 'url', 'pdf' (file_id or base64), 'file' (base64), or 'text'. Optional 'max_words'. Returns the summary.
Parameters:
pdf— string — A file_id from a prior tool, or a base64-encoded PDF.url— string — A public http/https URL to read.file— string — A base64-encoded .docx, .xlsx or .csv file.text— string — Raw text to summarize directly.max_words— integer — Approximate target length in words.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
answer_from_documentread-onlyAnswer a question grounded ONLY in a source document — a web page, PDF, Office file, or raw text. Provide 'question' plus ONE source: 'url', 'pdf', 'file' (base64), or 'text'. Says so when the answer isn't in the document.
Parameters:
question(required) — string — The question to answer from the document.pdf— string — A file_id from a prior tool, or a base64-encoded PDF.url— string — A public http/https URL to read.file— string — A base64-encoded .docx, .xlsx or .csv file.text— string — Raw text to answer from directly.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
docx_to_textread-onlyExtract the text of a .docx document (base64). Returns the text inline.
Parameters:
docx(required) — string — Base64-encoded .docx file.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world no
docx_to_pdfConvert a .docx document (base64) to a PDF. Returns a file_id and a ~1h URL.
Parameters:
docx(required) — string — Base64-encoded .docx file.
Hints: read-only no · destructive no · idempotent not declared · open-world no
read_urlread-onlyFetch a public http/https URL and return its main content as clean Markdown — ideal for giving an agent readable web content for research or RAG. Private/internal hosts are blocked.
Parameters:
url(required) — string — The http/https URL to read.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
url_to_pdfFetch a public http/https URL and render the live page to a PDF. Returns a file_id (chainable into the PDF tools) and a ~1h download URL. Private/internal hosts are blocked.
Parameters:
url(required) — string — The http/https URL to snapshot.
Hints: read-only no · destructive no · idempotent not declared · open-world yes
url_to_screenshotFetch a public http/https URL and capture a PNG screenshot. Set full_page for the entire scroll height. Returns a file_id and a ~1h download URL.
Parameters:
url(required) — string — The http/https URL to capture.full_page— boolean — Capture the full scroll height (default: viewport).
Hints: read-only no · destructive no · idempotent not declared · open-world yes
scrape_pageread-onlyFetch a public http/https URL and return its rendered HTML, the links on the page, and page metadata (title/description/OpenGraph/canonical/favicon) — in one render. For clean Markdown use read_url instead. Private/internal hosts are blocked.
Parameters:
url(required) — string — The http/https URL to scrape.formats— array — Which representations to return (default: all three).
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
Measured by MCPYP probing. Untested fields are omitted, never estimated. Listing is always free; MCPYP never proxies calls or stores user tokens.