PreteWorks API

com.preteworks由 preteworks.com 發布官方發布者v1.0.2更新於 Oct 24, 2026

One key for the document-to-web pipeline: scrape, AI-extract, build & edit PDFs, fill forms.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取檔案與儲存AI 與機器學習

概覽

AI 產生的概覽

一個託管的文件與網頁處理 API,讓助理抓取網頁、用 AI 擷取或摘要內容,並產生、編輯與填寫 PDF。

可以做什麼
將 HTML、Markdown、結構化文件與圖片轉成 PDF,把 DOCX 轉為 PDF 或文字,把 Office 檔案轉為 Markdown 或試算表,並把資料產生為 XLSX 或 CSV 檔案。編輯 PDF:合併、拆分、挑選或旋轉頁面,加上頁碼、浮水印與中繼資料,讀取並填寫表單欄位。讀取 PDF 中繼資料並擷取 PDF 文字,供搜尋或摘要使用。抓取公開網址,回傳 Markdown、HTML、連結、中繼資料、截圖或 PDF,並可批次抓取或爬取站內連結頁面。用 AI 從網頁、PDF、Office 檔案或純文字擷取指定欄位、產生摘要,或僅依據該來源回答問題。
適用情境
適合需要把網頁或文件轉成可讀文字或 PDF、拼接與整理 PDF、填寫 PDF 表單,或對指定來源做 AI 欄位擷取與問答的情境。適用於資料研究、RAG 準備與文件產生,不必在本機執行轉換函式庫。
執行需求
遠端 streamable HTTP 端點 api.preteworks.com。需在 Authorization 標頭提供 bearer API 金鑰,金鑰來自註冊頁面;免費額度標示為每月 500 單位且不需信用卡。需要網路存取;產生的檔案以檔案 ID 加約一小時有效的下載連結回傳。
安裝前請注意
API 金鑰是敏感憑證,透過 Authorization 標頭傳送;用量以單位計費,使用較多時可能需要付費方案。提交的文件、網址與文字會由第三方服務處理,AI 工具會把內容送到該服務進行擷取、摘要與問答。產生的下載連結約一小時後失效。抓取僅限公開主機,私有與內部位址會被阻擋。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 PreteWorks API,將其新增到工作區。
  2. 連接 Authorization token 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.preteworks%2Fpreteworks-api/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "preteworks-api": {
      "type": "http",
      "url": "https://api.preteworks.com/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

工具

29

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.

輸入參數html必填

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.

輸入參數pdf必填startformatposition

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.

輸入參數pdf必填

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.

輸入參數pdf必填titleauthorcreatorsubjectkeywords

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.

輸入參數data必填template必填

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.

輸入參數pdfs必填

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.

輸入參數pdf必填pages必填

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.

輸入參數pdf必填degrees必填

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.

輸入參數pdf必填text必填

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.

輸入參數pdf必填

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.

輸入參數images必填

markdown_to_pdf

Render Markdown to PDF

Render Markdown to a clean, print-styled PDF. Returns a file_id and a ~1h URL.

輸入參數titlemarkdown必填

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.

輸入參數pdf必填ranges

read_pdf_form

Read a PDF form

List a PDF's form fields (name, type, value, options) as JSON.

輸入參數pdf必填

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.

輸入參數pdf必填fields必填flatten

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.

輸入參數file必填format

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.

輸入參數rows必填formatsheet_name

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.

輸入參數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.

輸入參數url必填limit

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.

輸入參數url必填

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.

輸入參數pdfurlfilefields必填

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.

輸入參數pdfurlfiletextmax_words

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.

輸入參數pdfurlfiletextquestion必填

docx_to_text

DOCX to text

Extract the text of a .docx document (base64). Returns the text inline.

輸入參數docx必填

docx_to_pdf

DOCX to PDF

Convert a .docx document (base64) to a PDF. Returns a file_id and a ~1h URL.

輸入參數docx必填

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.

輸入參數url必填

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.

輸入參數url必填

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.

輸入參數url必填full_page

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.

輸入參數url必填formats

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 72%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分

    請在註冊中心條目中發布圖示。

  • 文件15 分

    請宣告包含 README 的 GitHub 儲存庫,或在 OAuth 受保護資源後設資料中提供 resource_documentation。

  • 授權條款不適用

    託管服務按其提供方的條款使用,因此這裡不要求授權條款。此檢查項不計入百分比。