SwissDocAI
v0.2.1MCP server for SwissDocAI: OCR, classification, extraction, layout and redaction of local documents, processed in Switzerland
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
process_document Process a document
OCR, classification into the workspace's labels and extraction of the label's fields for one local document. Returns the label, the confidence, the extracted fields and the text. Labels and fields are set up in the SwissDocAI console.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of a local PDF, PNG or JPEG file (absolute, or relative to the server's working directory). |
filename_template | With rename: a template that overrides the label's, e.g. {label}_{original}. Other placeholders are the label's field names. | |
include_text | boolean | Return the OCR text too (it can be long). |
model_version | Optional, v1 or v2. v2 uses newer models: better classification and extraction, results can differ from v1. Without it v1 runs, unless the account has a table field: then v2. With v1 table fields stay… | |
output_path | Optional path of a local file to write the full result to. Then only a short summary without the document's content is returned. | |
rename | boolean | Suggest a file name from the matched label's file name template. |
save_split_pdfs | boolean | With split_documents: write every document found as its own PDF next to the source file. |
split_documents | boolean | Find several documents in one PDF and classify and extract each. |
ocr_document Read a document's text (OCR)
The text of a local document (OCR), as Markdown with page markers. Tables come out as Markdown tables. For documents of many pages, prefer output_path.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of a local PDF, PNG or JPEG file (absolute, or relative to the server's working directory). |
model_version | Optional, v1 or v2. v2 uses newer models: better classification and extraction, results can differ from v1. Without it v1 runs, unless the account has a table field: then v2. With v1 table fields stay… | |
output_path | Optional path of a local file to write the full result to. Then only a short summary without the document's content is returned. |
analyze_layout Analyze a document's layout
Words, lines, paragraphs, tables and checkboxes of a local document with their boxes on the page, in the shape of Azure AI Document Intelligence's prebuilt-layout (status, createdDateTime, lastUpdatedDateTime, analyzeResult). The result is large, so it is written to a JSON file; a summary comes back. Up to 50 pages (beta).
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of a local PDF, PNG or JPEG file (absolute, or relative to the server's working directory). |
include_content | boolean | Also return the document's text (content). |
output_path | Path of the JSON file to write the result to. Default: next to the source, as <name>.layout.json. |
redact_document Redact personal data
Find personal data in a local document and black it out (beta). Writes the redacted PDF next to the source file; the source is never changed. Review the result before passing it on: the redaction is automatic.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path of a local PDF, PNG or JPEG file (absolute, or relative to the server's working directory). |
categories | Categories to search. Default: person, birth_date, address, contact, identifier, financial. Also possible: date (other dates such as appointments), organization (data of organizations). | |
include_values | boolean | Return the values found (names, dates, numbers). Off by default: the values are the personal data being removed. |
keep | What to keep readable, e.g. 'names and addresses of clinics'. | |
notes | Context about the documents, e.g. 'medical reports'. | |
output_path | Where to write the result. Default: next to the source, as <name>.redacted.pdf (render) or <name>.redaction.json. | |
qr_codes | boolean | Black out every QR code (the payment part of a QR-bill holds names and IBAN). |
redact | What to black out, in words, e.g. 'names of patients'. | |
render | boolean | Write the redacted PDF (bars burnt in, no text layer, checked by reading it again). False: only the findings with their boxes, as JSON. |
list_labels List labels
All labels of the token's workspace, with their description, examples, fields, file name template and revision. Labels are what process_document classifies into.
get_label Get a label
One label with its current revision. Read it before changing it.
| Parameter | Type | Description |
|---|---|---|
label_id * | string | The label's label_id, e.g. invoice. |
create_label Create a label
Create a label in the workspace. Needs an API token with read and write access to labels. Free of charge; at most 60 label changes per minute.
| Parameter | Type | Description |
|---|---|---|
label_id * | string | New identifier: lowercase letters, digits, - and _, e.g. invoice. |
name * | string | Display name, e.g. Rechnung. |
description | What documents of this label look like; the classifier reads it. | |
examples | Short typical phrases or titles of such documents (up to 30). | |
extraction_schema | The fields to extract (up to 50, at most 5 tables). | |
filename_template | File name for process_document with rename: {label}, {original} and the names of the label's fields (not tables), e.g. {Rechnungsdatum}_{Absender}. |
update_label Change a label
Change a label: only the arguments given change. examples and extraction_schema replace the whole list, so send every entry that should stay. An empty description or filename_template clears it. Every change is kept as a revision and can be undone with restore_label_revision. Needs a token with read and write access.
| Parameter | Type | Description |
|---|---|---|
label_id * | string | The label's label_id, e.g. invoice. |
revision * | integer | The label's current revision, from get_label or list_labels. The change is made only if the label is still at this revision. |
description | What documents of this label look like; the classifier reads it. | |
examples | Short typical phrases or titles of such documents (up to 30). | |
extraction_schema | The fields to extract (up to 50, at most 5 tables). | |
filename_template | File name for process_document with rename: {label}, {original} and the names of the label's fields (not tables), e.g. {Rechnungsdatum}_{Absender}. | |
name |
delete_label Delete a label
Delete a label for good, with all its revisions: it cannot be restored and documents are no longer classified into it. Ask the user before deleting. Needs a token with read and write access.
| Parameter | Type | Description |
|---|---|---|
label_id * | string | The label's label_id, e.g. invoice. |
revision * | integer | The label's current revision, from get_label or list_labels. The change is made only if the label is still at this revision. |
list_label_revisions List a label's revisions
Earlier states of a label, newest first (the last 50): what it looked like after each change, whether the change came through the API or the console, and when.
| Parameter | Type | Description |
|---|---|---|
label_id * | string | The label's label_id, e.g. invoice. |
restore_label_revision Restore a label revision
Give a label the content of an earlier revision. This is itself a new revision, so it can be undone too. Needs a token with read and write access.
| Parameter | Type | Description |
|---|---|---|
label_id * | string | The label's label_id, e.g. invoice. |
revision * | integer | The revision to go back to, from list_label_revisions. |
classify_text Classify a text
Classify a text into the workspace's labels: the label, the confidence and the reasoning. Use it to check a label after changing it, with the text of a known document (ocr_document once, then classify as often as needed). Costs one page of quota per call.
| Parameter | Type | Description |
|---|---|---|
text * | string | The document's text, e.g. from ocr_document. |
model_version | Optional, v1 or v2, as in process_document. |