doc2x-mcp

v0.1.7
@noedgeai-org/doc2x-mcp Checked 1 day ago Published 1 month ago

Doc2x MCP server (stdio, MCP SDK).

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

doc2x_parse_pdf_submit

Create a Doc2x PDF parse task for a local file and return {uid}. Prefer calling doc2x_parse_pdf_status to monitor progress/result; only call doc2x_parse_pdf_wait_text if the user explicitly asks to wait/return merged text.

ParameterTypeDescription
pdf_path *stringAbsolute path to a local PDF file. Use an absolute path (relative paths are resolved from the MCP server process cwd, which may be '/'). Must end with '.pdf'.
modelstringOptional parse model. Supported values: 'v2' and 'v3-2026'. Omit this field to use default v2.

doc2x_parse_pdf_status

Query parse task status by uid. Returns {status, progress, detail}. status is one of processing/failed/success; progress is an integer 0..100; detail is populated only when status=failed. Fetch parsed content via doc2x_convert_export_*.

ParameterTypeDescription
uid *stringDoc2x parse task uid returned by doc2x_parse_pdf_submit.

doc2x_parse_pdf_wait_text

Wait for a PDF parse task until success and return merged text. Prefer passing uid (no re-submit). If only pdf_path is provided, it will (a) reuse an in-process cached uid if available, otherwise (b) submit a new task then wait.

ParameterTypeDescription
join_withstring
max_output_charsintegerMax characters of returned text (0 = unlimited). Useful to avoid LLM context overflow. Default can be set via env DOC2X_PARSE_PDF_MAX_OUTPUT_CHARS.
max_output_pagesintegerMax pages to merge into returned text (0 = unlimited). Default can be set via env DOC2X_PARSE_PDF_MAX_OUTPUT_PAGES.
max_wait_msinteger
modelstringOptional parse model used only when submitting from pdf_path. Supported values: 'v2' and 'v3-2026'. Omit this field to use default v2.
pdf_pathstringAbsolute path to a local PDF file. If uid is not provided, this tool will reuse cached uid (if any) or submit a new task.
poll_interval_msinteger
uidstringDoc2x parse task uid returned by doc2x_parse_pdf_submit.

doc2x_materialize_pdf_layout_json

Wait for a PDF parse task and write the raw Doc2x result JSON (with page layout) to output_path. Prefer passing uid. If only pdf_path is provided, this tool reuses a cached uid or submits a new parse with model='v3-2026' by default.

ParameterTypeDescription
output_path *stringAbsolute path for the output JSON file. The file will be overwritten if it exists.
max_wait_msinteger
modelstringOptional parse model used only when submitting from pdf_path. Supported values: 'v2' and 'v3-2026'. Defaults to 'v3-2026' for this tool because v2 does not return layout.
pdf_pathstringAbsolute path to a local PDF file. If uid is not provided, this tool will reuse cached uid (if any) or submit a new task.
poll_interval_msinteger
uidstringDoc2x parse task uid returned by doc2x_parse_pdf_submit.

doc2x_convert_export_submit

Start an export (convert) job for a parsed PDF uid. After this, poll with doc2x_convert_export_wait or doc2x_convert_export_result. Do NOT call doc2x_convert_export_submit twice for the same uid+format in parallel.

ParameterTypeDescription
formula_mode *string
to *string
uid *stringDoc2x parse task uid returned by doc2x_parse_pdf_submit.
filenamestringOptional output filename (for md/tex only). Tip: pass a basename WITHOUT extension to avoid getting 'name.md.md' / 'name.tex.tex'.
filename_modestringHow to treat filename. 'auto' strips the target extension and shortens names exceeding 50 Unicode characters with a stable hash suffix; 'raw' preserves the basename and rejects names over 50 character…
formula_levelOptional formula degradation level. Effective only when source parse uses model=v3-2026 (ignored by v2). 0: keep formulas, 1: degrade inline formulas, 2: degrade inline and block formulas.
merge_cross_page_formsboolean

doc2x_convert_export_result

Get the latest export (convert) result for a parsed PDF uid (may contain an escaped URL).

ParameterTypeDescription
uid *stringDoc2x parse task uid returned by doc2x_parse_pdf_submit.

doc2x_convert_export_wait

Wait for an export job to finish. Prefer calling doc2x_convert_export_submit first, then wait with uid+to. For backward compatibility, if formula_mode is provided and this job was not submitted in-process, this tool will submit once then wait.

ParameterTypeDescription
to *stringExpected target format. Rejects contradictory legacy URL format hints; current download URLs may use opaque object IDs. Keep exports for the same uid sequential.
uid *stringDoc2x parse task uid returned by doc2x_parse_pdf_submit.
filenamestring
filename_modestringFor auto-submission: 'auto' strips the target extension and shortens names to at most 50 Unicode characters with a stable hash suffix; 'raw' preserves the basename and rejects longer names.
formula_levelOptional formula degradation level used when this tool auto-submits export (formula_mode must be provided). Effective only when source parse uses model=v3-2026 (ignored by v2).
formula_modestring
max_wait_msinteger
merge_cross_page_formsboolean
poll_interval_msinteger

doc2x_parse_image_layout_sync

Parse an image layout synchronously and return the raw Doc2x result JSON (including convert_zip when present).

ParameterTypeDescription
image_path *stringAbsolute path to a local image file (png/jpg). Use an absolute path (relative paths are resolved from the MCP server process cwd, which may be '/').

doc2x_parse_image_layout_submit

Create an async image-layout parse task and return {uid}. After this, call doc2x_parse_image_layout_wait_text (with uid) or doc2x_parse_image_layout_status.

ParameterTypeDescription
image_path *stringAbsolute path to a local image file (png/jpg). Use an absolute path (relative paths are resolved from the MCP server process cwd, which may be '/').

doc2x_parse_image_layout_status

Get status/result for an existing async image-layout parse task by uid.

ParameterTypeDescription
uid *stringDoc2x image-layout parse task uid returned by doc2x_parse_image_layout_submit.

doc2x_parse_image_layout_wait_text

Wait for an image-layout parse task until success, returning first page markdown. Prefer passing uid (no re-submit). If only image_path is provided, it will (a) reuse an in-process cached uid if available, otherwise (b) submit a new async task then wait.

ParameterTypeDescription
image_pathstringAbsolute path to a local image file (png/jpg). Used to reuse cached uid or submit a new async task.
max_wait_msinteger
poll_interval_msinteger
uidstringDoc2x image-layout parse task uid returned by doc2x_parse_image_layout_submit.

doc2x_download_url_to_file

Download a Doc2x-provided URL (e.g. from doc2x_convert_export_result) to a local file path.

ParameterTypeDescription
output_path *stringAbsolute path for the output file. The file will be overwritten if it exists.
url *stringA URL returned by doc2x_convert_export_result (may contain escaped '\u0026').

doc2x_materialize_convert_zip

Materialize convert_zip (base64) into output_dir. Best-effort: tries system unzip first; otherwise writes the zip file.

ParameterTypeDescription
convert_zip_base64 *string
output_dir *string

doc2x_debug_config

Debug helper: return resolved config and API key source for troubleshooting.