Serveur MCP

PreteWorks API

com.preteworks/preteworks-api
Connaissance et documentation Productivité Public et accessible MCP 2025-11-25

Ce que fait ce MCP

Scrapes and extracts information from web pages and documents, answers document-grounded questions, and converts, fills, merges, renders, and edits PDFs and spreadsheets.

answer_from_document
Answer a question from a document (AI)
Answer 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.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['question'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool, or a base64-encoded PDF.'}, 'url': {'type': 'string', 'description': 'A public http/https URL to read.'}, 'file': {'type': 'string', 'description': 'A base64-encoded .docx, .xlsx or .csv file.'}, 'text': {'type': 'string', 'description': 'Raw text to answer from directly.'}, 'question': {'type': 'string', 'description': 'The question to answer from the document.'}}}
batch_scrape
Batch: URLs to Markdown
Fetch 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.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['urls'], 'properties': {'urls': {'type': 'array', 'items': {'type': 'string'}, 'maxItems': 10, 'minItems': 1, 'description': '1â\x80\x9310 http/https URLs.'}}}
crawl_site
Crawl a site to Markdown
Fetch 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.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'The root http/https URL.'}, 'limit': {'type': 'integer', 'maximum': 8, 'minimum': 1, 'description': 'Max pages incl. root (default 5, max 8).'}}}
data_to_spreadsheet
Create a spreadsheet from rows
Turn 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['rows'], 'properties': {'rows': {'type': 'array', 'items': {}, 'minItems': 1, 'description': 'Array of objects (keysâ\x86\x92columns) or array of arrays (first row = header).'}, 'format': {'enum': ['xlsx', 'csv'], 'type': 'string', 'description': 'Output format (default xlsx).'}, 'sheet_name': {'type': 'string', 'description': "Worksheet name (default 'Sheet1')."}}}
docx_to_pdf
DOCX to PDF
Convert a .docx document (base64) to a PDF. Returns a file_id and a ~1h URL.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['docx'], 'properties': {'docx': {'type': 'string', 'description': 'Base64-encoded .docx file.'}}}
docx_to_text
DOCX to text
Extract the text of a .docx document (base64). Returns the text inline.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['docx'], 'properties': {'docx': {'type': 'string', 'description': 'Base64-encoded .docx file.'}}}
extract_data
Extract structured data (AI)
Extract 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.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['fields'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}, 'url': {'type': 'string', 'description': 'A public http/https URL to read.'}, 'file': {'type': 'string', 'description': 'A base64-encoded .docx, .xlsx or .csv file (converted to text first).'}, 'fields': {'type': 'array', 'items': {'type': 'string'}, 'description': "Field names to extract, e.g. ['invoice total','due date']."}}}
extract_pdf_text
Extract text from a PDF
Extract 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.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}}}
file_to_markdown
File to Markdown
Convert 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.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['file'], 'properties': {'file': {'type': 'string', 'description': 'Base64-encoded .docx, .xlsx or .csv file.'}, 'format': {'enum': ['docx', 'xlsx', 'csv'], 'type': 'string', 'description': 'Optional format hint; auto-detected if omitted.'}}}
fill_pdf_form
Fill a PDF form
Fill a PDF's form fields from a map of field -> value; optionally flatten. Returns a file_id and a ~1h URL.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf', 'fields'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}, 'fields': {'type': 'object', 'description': 'Map of field name to value.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'flatten': {'type': 'boolean', 'description': 'Flatten the form after filling (default false).'}}}
images_to_pdf
Images to PDF
Combine PNG/JPEG images (base64) into a PDF, one image per page. Returns a file_id and a ~1h URL.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['images'], 'properties': {'images': {'type': 'array', 'items': {'type': 'string'}, 'description': 'Base64-encoded PNG/JPEG images, one per page (max 20).'}}}
map_site
Map a site's URLs
Discover the same-origin URLs linked from a page — the site map, with no page content fetched. Private/internal hosts are blocked.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'The http/https URL to map.'}}}
markdown_to_pdf
Render Markdown to PDF
Render Markdown to a clean, print-styled PDF. Returns a file_id and a ~1h URL.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['markdown'], 'properties': {'title': {'type': 'string', 'description': 'Document title.'}, 'markdown': {'type': 'string', 'description': 'The Markdown to render.'}}}
merge_pdfs
Merge PDFs
Combine 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdfs'], 'properties': {'pdfs': {'type': 'array', 'items': {'type': 'string'}, 'minItems': 2, 'description': '2+ PDF sources. Each: A file_id from a prior tool result, or a base64-encoded PDF.'}}}
number_pdf
Number PDF pages
Stamp 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}, 'start': {'type': 'number', 'description': "First page's number (default 1)."}, 'format': {'type': 'string', 'description': "e.g. '{n}' or '{n} / {total}' (default '{n}')."}, 'position': {'type': 'string', 'description': 'Where to place it (default bottom-center).'}}}
pdf_info
Read PDF info
Read a PDF's metadata (title, author, subject, keywords, creator, producer, dates) plus page count and page size, as JSON.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}}}
read_pdf_form
Read a PDF form
List a PDF's form fields (name, type, value, options) as JSON.
Lecture seule
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}}}
read_url
Read a web page as Markdown
Fetch 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.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'The http/https URL to read.'}}}
render_document
Generate a document
Render 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['template', 'data'], 'properties': {'data': {'type': 'object', 'description': '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.', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'template': {'enum': ['invoice', 'receipt', 'report'], 'type': 'string', 'description': 'Document template.'}}}
render_html_to_pdf
Render HTML to PDF
Render 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['html'], 'properties': {'html': {'type': 'string', 'description': 'The complete HTML document to render.'}}}
rotate_pdf
Rotate PDF
Rotate every page of a PDF by 90, 180, or 270 degrees (clockwise). Returns a file_id (for chaining) and a ~1h download URL.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf', 'degrees'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}, 'degrees': {'type': 'number', 'description': '90, 180, or 270.'}}}
scrape_page
Scrape a web page (HTML + links + metadata)
Fetch 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.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'The http/https URL to scrape.'}, 'formats': {'type': 'array', 'items': {'enum': ['html', 'links', 'metadata'], 'type': 'string'}, 'description': 'Which representations to return (default: all three).'}}}
select_pages
Select PDF pages
Keep 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf', 'pages'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}, 'pages': {'type': 'string', 'description': "Pages to keep, e.g. '1,3,5-7'."}}}
set_pdf_metadata
Set PDF metadata
Set 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}, 'title': {'type': 'string'}, 'author': {'type': 'string'}, 'creator': {'type': 'string'}, 'subject': {'type': 'string'}, 'keywords': {'anyOf': [{'type': 'string'}, {'type': 'array', 'items': {'type': 'string'}}]}}}
split_pdf
Split a PDF
Split 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}, 'ranges': {'type': 'string', 'description': "e.g. '1-3;4-6'. Omit to split every page."}}}
summarize_document
Summarize a document (AI)
Summarize 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.
Lecture seule Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool, or a base64-encoded PDF.'}, 'url': {'type': 'string', 'description': 'A public http/https URL to read.'}, 'file': {'type': 'string', 'description': 'A base64-encoded .docx, .xlsx or .csv file.'}, 'text': {'type': 'string', 'description': 'Raw text to summarize directly.'}, 'max_words': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'Approximate target length in words.', 'exclusiveMinimum': 0}}}
url_to_pdf
Snapshot a web page as PDF
Fetch 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.
Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'The http/https URL to snapshot.'}}}
url_to_screenshot
Screenshot a web page
Fetch 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.
Accès externe
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['url'], 'properties': {'url': {'type': 'string', 'description': 'The http/https URL to capture.'}, 'full_page': {'type': 'boolean', 'description': 'Capture the full scroll height (default: viewport).'}}}
watermark_pdf
Watermark PDF
Stamp 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.
Schéma d’entrée
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['pdf', 'text'], 'properties': {'pdf': {'type': 'string', 'description': 'A file_id from a prior tool result, or a base64-encoded PDF.'}, 'text': {'type': 'string', 'description': 'The watermark text.'}}}
Ajouté
scrape_page
17 September 2026 12:36
Ajouté
url_to_screenshot
17 September 2026 12:36
Ajouté
url_to_pdf
17 September 2026 12:36
Ajouté
read_url
17 September 2026 12:36
Ajouté
docx_to_pdf
17 September 2026 12:36
Ajouté
docx_to_text
17 September 2026 12:36
Ajouté
answer_from_document
17 September 2026 12:36
Ajouté
summarize_document
17 September 2026 12:36
Ajouté
extract_data
17 September 2026 12:36
Ajouté
map_site
17 September 2026 12:36
Ajouté
crawl_site
17 September 2026 12:36
Ajouté
batch_scrape
17 September 2026 12:36
Ajouté
data_to_spreadsheet
17 September 2026 12:36
Ajouté
file_to_markdown
17 September 2026 12:36
Ajouté
fill_pdf_form
17 September 2026 12:36
Ajouté
read_pdf_form
17 September 2026 12:36
Ajouté
split_pdf
17 September 2026 12:36
Ajouté
markdown_to_pdf
17 September 2026 12:36
Ajouté
images_to_pdf
17 September 2026 12:36
Ajouté
extract_pdf_text
17 September 2026 12:36
Ajouté
watermark_pdf
17 September 2026 12:36
Ajouté
rotate_pdf
17 September 2026 12:36
Ajouté
select_pages
17 September 2026 12:36
Ajouté
merge_pdfs
17 September 2026 12:36
Ajouté
render_document
17 September 2026 12:36
Ajouté
set_pdf_metadata
17 September 2026 12:36
Ajouté
pdf_info
17 September 2026 12:36
Ajouté
number_pdf
17 September 2026 12:36
Ajouté
render_html_to_pdf
17 September 2026 12:36