MCP reference
Tools of the MCP server, with their scopes, inputs and outputs.
This reference is generated from the tool list of the MCP server.
Server: untern-lens-portal, version 2.9.0.
Tools
| Tool | Scope |
|---|---|
cancel_job | documents:write |
estimate_credits | documents:read |
extract_fields | documents:write |
get_chunks | documents:read |
get_document_pages | documents:read |
get_extraction | documents:read |
get_job | documents:read |
get_usage | documents:read |
list_jobs | documents:read |
list_schemas | documents:read |
parse_document | documents:write |
read_result | documents:read |
wait_for_job | documents:read |
whoami | Any valid credential |
cancel_job
Cancel a job that has not started yet. A running job cannot be cancelled.
- Title: Cancel a job
- Scope:
documents:write - Read only: No
- Destructive: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
job_id | string | Yes | Job id |
Output
| Property | Type | Required | Description |
|---|---|---|---|
cache_hit | boolean | No | Default: false. |
created_at | string (date-time) | Yes | |
credits | JobCredits or null | No | Credits of this task; null while billing is off Default: null. |
error | JobError or null | No | Default: null. |
file_id | string | Yes | |
id | string | Yes | Task id (task_id of POST /api/files/process) |
mode | string or null | No | Parsing mode Default: null. |
pages | string or null | No | Requested pages, normalised Default: null. |
response_format | string or null | No | Default: null. |
result_id | string or null | No | Set once the task has completed Default: null. |
retryable | boolean | No | Default: false. |
source | JobSource | No | |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes | True for completed and failed |
updated_at | string (date-time) | Yes |
Definitions
JobCredits
Credits of one task (billing on); the same numbers as the X-Credits-* headers.
| Property | Type | Required | Description |
|---|---|---|---|
charged | integer or null | No | Charged once the task is terminal Default: null. |
refunded | integer or null | No | Released back (failed pages, own cache, estimate above actual) Default: null. |
reserved | integer or null | No | Credits held when the task was created Default: null. |
JobError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Failure code of the task (closed list of the API) |
message | string or null | No | Short reason; no document content Default: null. |
retryable | boolean | Yes | True when submitting the same work again may succeed |
JobSource
| Property | Type | Required | Description |
|---|---|---|---|
md5 | string or null | No | MD5 of the uploaded bytes Default: null. |
name | string or null | No | Name of the uploaded file Default: null. |
size_bytes | integer or null | No | Size of the stored source, if known Default: null. |
estimate_credits
The most credits parsing these files can cost, before uploading anything. Pass metadata only (mime, size_bytes, page_count, ...) or the file_id of an uploaded file. Nothing is held or charged.
- Title: Estimate credits
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
items | array of EstimateFile or EstimateFileRef | Yes | Files to price, 1 to 100 |
mode | string or null | No | fast, auto, precise or expert Default: null. |
pages | string or null | No | Page selection, e.g. 1-3,7 Default: null. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
complete | boolean | Yes | False when an item could not be priced (see its error) |
credits_remaining | integer or null | No | Default: null. |
items | array of EstimateItem | Yes | |
kind | "estimate" | No | Default: estimate. |
quote_expires_at | string (date-time) | Yes | Until when these rates apply (15 minutes); estimate again after it |
rates_version | string | Yes | |
schema_version | "1" | No | Default: 1. |
total_credits | integer | Yes | |
within_balance | boolean or null | No | Default: null. |
Definitions
EstimateFile
Metadata of a file that is not uploaded yet (never its bytes; the name is not used).
| Property | Type | Required | Description |
|---|---|---|---|
mime | string | Yes | Media type, e.g. application/pdf |
name | string or null | No | Accepted, never stored Default: null. |
page_count | integer or null | No | PDF pages or slides Default: null. |
sha256 | string or null | No | Accepted, not used yet Default: null. |
sheet_cells | array of integer or null | No | Non-empty cells per sheet (XLSX) Default: null. |
size_bytes | integer or null | No | Default: null. |
text_chars | integer or null | No | Characters of text (DOCX, TXT) Default: null. |
text_pages | integer or null | No | Pages with a usable text layer, when known Default: null. |
EstimateFileRef
A file already uploaded by the caller.
| Property | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes |
EstimateItem
| Property | Type | Required | Description |
|---|---|---|---|
basis | string or null | No | How the credits were computed Default: null. |
cached | boolean | No | Default: false. |
credits | integer or null | Yes | The ceiling: the most this item can cost |
credits_expected | integer or null | No | The likely cost: pages whose text layer is not known are priced as text pages (where the mode has a text rate); equal to credits when every page is known Default: null. |
error | EstimateItemError or null | No | Default: null. |
exactness | string, one of exact, upper_bound or null | No | Default: null. |
mode | string or null | No | Default: null. |
pages | integer or null | No | Default: null. |
EstimateItemError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string or null | No | Default: null. |
extract_fields
Extract the fields of a JSON Schema (or a server schema NAME@VERSION from list_schemas) from a finished result. Pass job_id or result_id. Each value comes with quotes found in the document; with require_evidence (default) a value without one is dropped. Waits up to wait_s seconds for the result.
- Title: Extract fields
- Scope:
documents:write - Read only: No
- Destructive: No
- Idempotent: No
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
idempotency_key | string or null | No | Reuse it on retries: the same key returns the first extraction Default: null. |
instructions | string or null | No | Extra guidance Default: null. |
job_id | string or null | No | Job id from parse_document Default: null. |
max_credits | integer or null | No | Refuse above this Default: null. |
require_evidence | boolean | No | Drop values without a quote Default: true. |
result_id | string or null | No | Result id of a finished job Default: null. |
schema | map of JsonValue or null | No | JSON Schema in the subset Default: null. |
schema_ref | string or null | No | Server schema NAME@VERSION Default: null. |
wait_s | integer | No | Seconds to wait for the result From 0 to 50. Default: 30. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
data | map of JsonValue or null | No | Default: null. |
error | ServerError or null | No | Default: null. |
errors | array of string | No | |
fields | map of ExtractedField | No | |
id | string | Yes | |
job_id | string or null | Yes | |
kind | "extraction" | No | Default: extraction. |
needs_review | array of string | No | |
prompt_ref | string or null | No | Default: null. |
result_id | string | Yes | |
schema_ref | string | Yes | "invoice@1" or "inline:sha256:<12 hex>" |
schema_version | "1" | No | Default: 1. |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes |
Definitions
DocumentBBox
Axis-aligned box, top-left origin, in the page's unit.
| Property | Type | Required | Description |
|---|---|---|---|
x0 | number | Yes | |
x1 | number | Yes | |
y0 | number | Yes | |
y1 | number | Yes |
Evidence
A quote that was found in the document (untern_docai.extract.Evidence).
| Property | Type | Required | Description |
|---|---|---|---|
bbox | DocumentBBox or null | No | Default: null. |
block_id | string | Yes | |
page | integer | Yes | |
quote | string | Yes | |
reanchored | boolean | No | Found in another block than the cited one Default: false. |
ExtractedField
| Property | Type | Required | Description |
|---|---|---|---|
confidence | number | Yes | From 0 to 1. |
evidence | array of Evidence | No | |
message | string or null | No | Default: null. |
name | string | Yes | |
status | string, one of ok, missing, unsupported, invalid | Yes | |
value | JsonValue | No | Default: null. |
JsonValue
Type: any.
ServerError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
retryable | boolean | No | Default: false. |
get_chunks
Heading-aware chunks of a finished result (text, heading path, pages, block ids and boxes) for retrieval or citation. Pass job_id or result_id; read on with cursor = next_cursor until it is null.
- Title: Read retrieval chunks
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
cursor | string or null | No | next_cursor of the previous page Default: null. |
job_id | string or null | No | Job id from parse_document Default: null. |
limit | integer | No | Chunks per page From 1 to 50. Default: 20. |
max_chars | integer | No | Largest chunk in characters From 200 to 4000. Default: 1500. |
result_id | string or null | No | Result id of a finished job Default: null. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
items | array of object | Yes | |
kind | "chunk_page" | No | Default: chunk_page. |
next_cursor | string or null | Yes | Pass as cursor to read on; null at the end |
result_id | string | Yes | |
schema_version | "1" | No | Default: 1. |
get_document_pages
Up to 10 pages of a finished result as a structured Document (blocks with type, text, heading level and bounding box). Pass job_id or result_id and from_page; read on from to_page + 1 until it equals page_count.
- Title: Read document pages
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
from_page | integer | No | First page, 1-based At least 1. Default: 1. |
job_id | string or null | No | Job id from parse_document Default: null. |
result_id | string or null | No | Result id of a finished job Default: null. |
to_page | integer or null | No | Last page, at most from_page + 9 Default: null. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
document | Document | Yes | |
from_page | integer | Yes | |
kind | "document_window" | No | Default: document_window. |
page_count | integer | Yes | Pages in the whole document |
result_id | string | Yes | |
schema_version | "1" | No | Default: 1. |
to_page | integer | Yes | Last page in this window; read on from to_page + 1 |
Definitions
Document
A parsed document: pages with their blocks and boxes (untern_docai.Document 1.0).
metadata (strings only) carries file_id, result_id, parsing_mode, parser_version,
page_count, page_image:<n> (path of page n's image, relative to the API base) for every
page that has one, and page_size_unknown (comma-separated page numbers whose size the bundle
did not record; those pages report 1 x 1).
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
metadata | map of string | No | |
pages | array of DocumentPage | No | |
schema_version | "1.0" | No | Default: 1.0. |
source | DocumentSource | Yes |
DocumentBBox
Axis-aligned box, top-left origin, in the page's unit.
| Property | Type | Required | Description |
|---|---|---|---|
x0 | number | Yes | |
x1 | number | Yes | |
y0 | number | Yes | |
y1 | number | Yes |
DocumentBlock
One layout element. A table block (and only it) carries table; its text is the
table's Markdown.
| Property | Type | Required | Description |
|---|---|---|---|
bbox | DocumentBBox or null | No | Default: null. |
children | array of DocumentBlock | No | |
confidence | number or null | No | Default: null. |
id | string | No | Default: ``. |
key | string or null | No | Default: null. |
level | integer or null | No | Default: null. |
page | integer | Yes | At least 1. |
table | DocumentTable or null | No | Default: null. |
text | string | No | Default: ``. |
type | string, one of heading, paragraph, list, list_item, table, figure, key_value, signature, stamp | Yes | |
value | string or null | No | Default: null. |
DocumentPage
A page; its rendered image (when the bundle has one) is named in Document.metadata.
| Property | Type | Required | Description |
|---|---|---|---|
blocks | array of DocumentBlock | No | |
dpi | number or null | No | Default: null. |
engine | string | Yes | |
height | number | Yes | |
number | integer | Yes | At least 1. |
rotation | integer, one of 0, 90, 180, 270 | No | Default: 0. |
unit | string, one of pt, px | No | Default: pt. |
width | number | Yes |
DocumentSource
| Property | Type | Required | Description |
|---|---|---|---|
mime_type | string | Yes | |
name | string | Yes | |
size_bytes | integer or null | No | Default: null. |
DocumentTable
A grid of cells; spanned positions are covered by exactly one anchor cell.
| Property | Type | Required | Description |
|---|---|---|---|
cells | array of DocumentTableCell | No | |
n_cols | integer | Yes | At least 0. |
n_rows | integer | Yes | At least 0. |
DocumentTableCell
| Property | Type | Required | Description |
|---|---|---|---|
bbox | DocumentBBox or null | No | Default: null. |
col | integer | Yes | At least 0. |
col_span | integer | No | At least 1. Default: 1. |
confidence | number or null | No | Default: null. |
is_header | boolean | No | Default: false. |
row | integer | Yes | At least 0. |
row_span | integer | No | At least 1. Default: 1. |
text | string | No | Default: ``. |
get_extraction
An extraction by id; wait_s (up to 50) waits for it to finish.
- Title: Get an extraction
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
extraction_id | string | Yes | Extraction id |
wait_s | integer | No | Seconds to wait for the result From 0 to 50. Default: 0. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
data | map of JsonValue or null | No | Default: null. |
error | ServerError or null | No | Default: null. |
errors | array of string | No | |
fields | map of ExtractedField | No | |
id | string | Yes | |
job_id | string or null | Yes | |
kind | "extraction" | No | Default: extraction. |
needs_review | array of string | No | |
prompt_ref | string or null | No | Default: null. |
result_id | string | Yes | |
schema_ref | string | Yes | "invoice@1" or "inline:sha256:<12 hex>" |
schema_version | "1" | No | Default: 1. |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes |
Definitions
DocumentBBox
Axis-aligned box, top-left origin, in the page's unit.
| Property | Type | Required | Description |
|---|---|---|---|
x0 | number | Yes | |
x1 | number | Yes | |
y0 | number | Yes | |
y1 | number | Yes |
Evidence
A quote that was found in the document (untern_docai.extract.Evidence).
| Property | Type | Required | Description |
|---|---|---|---|
bbox | DocumentBBox or null | No | Default: null. |
block_id | string | Yes | |
page | integer | Yes | |
quote | string | Yes | |
reanchored | boolean | No | Found in another block than the cited one Default: false. |
ExtractedField
| Property | Type | Required | Description |
|---|---|---|---|
confidence | number | Yes | From 0 to 1. |
evidence | array of Evidence | No | |
message | string or null | No | Default: null. |
name | string | Yes | |
status | string, one of ok, missing, unsupported, invalid | Yes | |
value | JsonValue | No | Default: null. |
JsonValue
Type: any.
ServerError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
retryable | boolean | No | Default: false. |
get_job
The current state of one parse job.
- Title: Get a job
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
job_id | string | Yes | Job id |
Output
| Property | Type | Required | Description |
|---|---|---|---|
cache_hit | boolean | No | Default: false. |
created_at | string (date-time) | Yes | |
credits | JobCredits or null | No | Credits of this task; null while billing is off Default: null. |
error | JobError or null | No | Default: null. |
file_id | string | Yes | |
id | string | Yes | Task id (task_id of POST /api/files/process) |
mode | string or null | No | Parsing mode Default: null. |
pages | string or null | No | Requested pages, normalised Default: null. |
response_format | string or null | No | Default: null. |
result_id | string or null | No | Set once the task has completed Default: null. |
retryable | boolean | No | Default: false. |
source | JobSource | No | |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes | True for completed and failed |
updated_at | string (date-time) | Yes |
Definitions
JobCredits
Credits of one task (billing on); the same numbers as the X-Credits-* headers.
| Property | Type | Required | Description |
|---|---|---|---|
charged | integer or null | No | Charged once the task is terminal Default: null. |
refunded | integer or null | No | Released back (failed pages, own cache, estimate above actual) Default: null. |
reserved | integer or null | No | Credits held when the task was created Default: null. |
JobError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Failure code of the task (closed list of the API) |
message | string or null | No | Short reason; no document content Default: null. |
retryable | boolean | Yes | True when submitting the same work again may succeed |
JobSource
| Property | Type | Required | Description |
|---|---|---|---|
md5 | string or null | No | MD5 of the uploaded bytes Default: null. |
name | string or null | No | Name of the uploaded file Default: null. |
size_bytes | integer or null | No | Size of the stored source, if known Default: null. |
get_usage
The plan of this token's account and its credits for the current or previous period (included, used, remaining, pages left on page-capped plans, the token's own budget).
- Title: Credits and plan
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
period | string, one of current, previous | No | Billing period Default: current. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
as_of | string (date-time) | Yes | |
credits_included | integer | Yes | |
credits_remaining | integer | Yes | Available now (holds taken off), without overage |
credits_topup_remaining | integer | Yes | |
credits_used | integer | Yes | |
kind | "usage" | No | Default: usage. |
overage_allowed | boolean | Yes | |
overage_cap | integer or null | No | Default: null. |
overage_used | integer | Yes | |
pages_included | integer or null | No | Page cap of the period (Free: 50); null without a page cap Default: null. |
pages_remaining | integer or null | No | Default: null. |
pages_used | integer or null | No | Pages used, open holds included Default: null. |
period_end | string (date-time) | Yes | |
period_start | string (date-time) | Yes | |
plan | PlanRef | Yes | |
preview | UsagePreview or null | No | Default: null. |
schema_version | "1" | No | Default: 1. |
token_budget | TokenBudget or null | No | The calling key's own budget, when one is set Default: null. |
Definitions
PlanRef
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | |
modes_allowed | array of string or null | No | Modes the plan includes; null means every mode Default: null. |
name | string | Yes | |
status | string | Yes | proposal until the founder approves the plan (G11) |
upgrade_to | string or null | No | The plan that includes more (modes, pages), if any Default: null. |
TokenBudget
| Property | Type | Required | Description |
|---|---|---|---|
limit | integer | Yes | |
period | string | Yes | |
remaining | integer | Yes | |
used | integer | Yes |
UsagePreview
| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | True while the product is in Preview |
pool | string or null | No | The capacity pool (tier) of the account Default: null. |
list_jobs
Your parse jobs, newest first; pass next_cursor back as cursor to page.
- Title: List jobs
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
cursor | string or null | No | Default: null. |
limit | integer | No | From 1 to 50. Default: 20. |
status | array of string, one of pending, processing, completed, failed or null | No | Only these statuses Default: null. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
items | array of Job | Yes | |
next_cursor | string or null | No | Opaque; pass as cursor for the next page, null at the end Default: null. |
Definitions
Job
| Property | Type | Required | Description |
|---|---|---|---|
cache_hit | boolean | No | Default: false. |
created_at | string (date-time) | Yes | |
credits | JobCredits or null | No | Credits of this task; null while billing is off Default: null. |
error | JobError or null | No | Default: null. |
file_id | string | Yes | |
id | string | Yes | Task id (task_id of POST /api/files/process) |
mode | string or null | No | Parsing mode Default: null. |
pages | string or null | No | Requested pages, normalised Default: null. |
response_format | string or null | No | Default: null. |
result_id | string or null | No | Set once the task has completed Default: null. |
retryable | boolean | No | Default: false. |
source | JobSource | No | |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes | True for completed and failed |
updated_at | string (date-time) | Yes |
JobCredits
Credits of one task (billing on); the same numbers as the X-Credits-* headers.
| Property | Type | Required | Description |
|---|---|---|---|
charged | integer or null | No | Charged once the task is terminal Default: null. |
refunded | integer or null | No | Released back (failed pages, own cache, estimate above actual) Default: null. |
reserved | integer or null | No | Credits held when the task was created Default: null. |
JobError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Failure code of the task (closed list of the API) |
message | string or null | No | Short reason; no document content Default: null. |
retryable | boolean | Yes | True when submitting the same work again may succeed |
JobSource
| Property | Type | Required | Description |
|---|---|---|---|
md5 | string or null | No | MD5 of the uploaded bytes Default: null. |
name | string or null | No | Name of the uploaded file Default: null. |
size_bytes | integer or null | No | Size of the stored source, if known Default: null. |
list_schemas
Server schemas usable as schema_ref in extract_fields.
- Title: List extraction schemas
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
No input.
Output
| Property | Type | Required | Description |
|---|---|---|---|
items | array of SchemaInfo | Yes |
Definitions
JsonValue
Type: any.
SchemaInfo
| Property | Type | Required | Description |
|---|---|---|---|
description | string | Yes | |
json_schema | map of JsonValue | Yes | |
ref | string | Yes | |
title | string | Yes |
parse_document
Start parsing a small document the model already holds (content_base64 + file_name, at most 4 MiB). Returns the job; pass wait_s (up to 50) to wait for it. For local files use the untern-parsing CLI: untern-parsing parse FILE --json.
- Title: Parse a document
- Scope:
documents:write - Read only: No
- Destructive: No
- Idempotent: No
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
force_reparse | boolean | No | Default: false. |
group | string or null | No | Default: null. |
max_credits | integer or null | No | Refuse the parse (max_credits_exceeded) above this many credits Default: null. |
mode | string, one of fast, auto, precise, expert, Local, Normal, Multimodal, Agentic, Quick | No | Parsing mode; the available ones are listed by GET /api/files/modes Default: Local. |
pages | string or null | No | e.g. 1-3,7 Default: null. |
preset | string or null | No | Document-type preset; sets the mode, never the price Default: null. |
project | string or null | No | Default: null. |
source | InlineSource or FileIdSource or UrlSource | Yes | Where the document comes from |
version_check | boolean | No | Default: false. |
wait_s | integer | No | From 0 to 50. Default: 0. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
cache_hit | boolean | No | Default: false. |
created_at | string (date-time) | Yes | |
credits | JobCredits or null | No | Credits of this task; null while billing is off Default: null. |
error | JobError or null | No | Default: null. |
file_id | string | Yes | |
id | string | Yes | Task id (task_id of POST /api/files/process) |
mode | string or null | No | Parsing mode Default: null. |
pages | string or null | No | Requested pages, normalised Default: null. |
response_format | string or null | No | Default: null. |
result_id | string or null | No | Set once the task has completed Default: null. |
retryable | boolean | No | Default: false. |
source | JobSource | No | |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes | True for completed and failed |
updated_at | string (date-time) | Yes |
Definitions
FileIdSource
| Property | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | A file you uploaded earlier (portal, CLI or a previous call) |
InlineSource
| Property | Type | Required | Description |
|---|---|---|---|
content_base64 | string | Yes | The file, base64-encoded; at most 4 MiB decoded |
file_name | string | Yes | Name with its extension |
JobCredits
Credits of one task (billing on); the same numbers as the X-Credits-* headers.
| Property | Type | Required | Description |
|---|---|---|---|
charged | integer or null | No | Charged once the task is terminal Default: null. |
refunded | integer or null | No | Released back (failed pages, own cache, estimate above actual) Default: null. |
reserved | integer or null | No | Credits held when the task was created Default: null. |
JobError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Failure code of the task (closed list of the API) |
message | string or null | No | Short reason; no document content Default: null. |
retryable | boolean | Yes | True when submitting the same work again may succeed |
JobSource
| Property | Type | Required | Description |
|---|---|---|---|
md5 | string or null | No | MD5 of the uploaded bytes Default: null. |
name | string or null | No | Name of the uploaded file Default: null. |
size_bytes | integer or null | No | Size of the stored source, if known Default: null. |
UrlSource
| Property | Type | Required | Description |
|---|---|---|---|
url | string | Yes | https URL of the document |
read_result
A window of a finished result's Markdown. Pass job_id or result_id; read on with offset = next_offset until it is null. HTML is not available yet.
- Title: Read a result
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
format | string, one of markdown, html | No | html is not available yet Default: markdown. |
job_id | string or null | No | Job id from parse_document Default: null. |
lang | string | No | HTML only; ignored for Markdown Default: en. |
max_chars | integer | No | Window size in characters From 1000 to 50000. Default: 20000. |
offset | integer | No | First character, default 0 At least 0. Default: 0. |
result_id | string or null | No | Result id of a finished job Default: null. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
content | string | Yes | |
format | string, one of markdown, html | Yes | |
kind | "result_window" | No | Default: result_window. |
next_offset | integer or null | Yes | Pass as offset to read on; null at the end |
offset | integer | Yes | |
result_id | string | Yes | |
schema_version | "1" | No | Default: 1. |
total_chars | integer | Yes | |
truncated | boolean | Yes |
wait_for_job
Wait up to timeout_s seconds (at most 50) for a job to finish. If terminal is false in the answer, call it again.
- Title: Wait for a job
- Scope:
documents:read - Read only: Yes
- Idempotent: Yes
- Open world: No
Input
| Property | Type | Required | Description |
|---|---|---|---|
job_id | string | Yes | Job id |
timeout_s | integer | No | From 1 to 50. Default: 30. |
Output
| Property | Type | Required | Description |
|---|---|---|---|
cache_hit | boolean | No | Default: false. |
created_at | string (date-time) | Yes | |
credits | JobCredits or null | No | Credits of this task; null while billing is off Default: null. |
error | JobError or null | No | Default: null. |
file_id | string | Yes | |
id | string | Yes | Task id (task_id of POST /api/files/process) |
mode | string or null | No | Parsing mode Default: null. |
pages | string or null | No | Requested pages, normalised Default: null. |
response_format | string or null | No | Default: null. |
result_id | string or null | No | Set once the task has completed Default: null. |
retryable | boolean | No | Default: false. |
source | JobSource | No | |
status | string, one of pending, processing, completed, failed | Yes | |
terminal | boolean | Yes | True for completed and failed |
updated_at | string (date-time) | Yes |
Definitions
JobCredits
Credits of one task (billing on); the same numbers as the X-Credits-* headers.
| Property | Type | Required | Description |
|---|---|---|---|
charged | integer or null | No | Charged once the task is terminal Default: null. |
refunded | integer or null | No | Released back (failed pages, own cache, estimate above actual) Default: null. |
reserved | integer or null | No | Credits held when the task was created Default: null. |
JobError
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Failure code of the task (closed list of the API) |
message | string or null | No | Short reason; no document content Default: null. |
retryable | boolean | Yes | True when submitting the same work again may succeed |
JobSource
| Property | Type | Required | Description |
|---|---|---|---|
md5 | string or null | No | MD5 of the uploaded bytes Default: null. |
name | string or null | No | Name of the uploaded file Default: null. |
size_bytes | integer or null | No | Size of the stored source, if known Default: null. |
whoami
The identity, access and limits of the token this server was given. Call it first to check the setup; it never shows the token.
- Title: Who am I
- Scope: Any valid credential
- Read only: Yes
- Idempotent: Yes
- Open world: No
Input
No input.
Output
| Property | Type | Required | Description |
|---|---|---|---|
api_url | string | Yes | |
authenticated | boolean | Yes | |
credential | string, one of api_key, oidc, unknown or null | No | Default: null. |
email | string or null | No | Default: null. |
expires_at | string (date-time) or null | No | Default: null. |
issuer | string or null | No | Default: null. |
key_hint | string or null | No | Default: null. |
kind | "auth_status" | No | Default: auth_status. |
limits | Limits | Yes | |
name | string or null | No | Default: null. |
principal | string or null | No | Default: null. |
profile | string | No | Default: mcp. |
roles | array of string | No | Default: []. |
schema_version | "1" | No | Default: 1. |
scopes | array of string | No | Default: []. |
source | "token" | No | Default: token. |
Definitions
Limits
Limits of this MCP server, so an agent can plan its calls.
| Property | Type | Required | Description |
|---|---|---|---|
burst | integer | Yes | Tool calls a credential may make at once |
calls_per_minute | number | Yes | Sustained tool calls per credential |
max_inline_bytes | integer | Yes | Largest content_base64 file, decoded |
max_wait_s | integer | Yes | Longest wait_s / timeout_s a tool accepts |
max_window_chars | integer | Yes | Most characters one read_result call returns |