dual-extract-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DUAL_EXTRACT_PARALLEL | No | Page parallelism (default serial to prevent 3090 OOM) | false |
| DUAL_EXTRACT_TEMP_DIR | No | Temporary directory (cleaned on exit) | ./tmp |
| DUAL_EXTRACT_IMAGE_DPI | No | Page image / image DPI | 200 |
| DUAL_EXTRACT_LOG_LEVEL | No | Log level | INFO |
| DUAL_EXTRACT_MAX_PAGES | No | Maximum page count | 1000 |
| DUAL_EXTRACT_OUTPUT_DIR | No | Output root directory (absolute path recommended) | ./outputs |
| DUAL_EXTRACT_MAX_FILE_MB | No | Maximum input PDF size in MB | 500 |
| DUAL_EXTRACT_MODEL_JUDGE | No | Model judge (default off, not implemented before v0.4) | false |
| DUAL_EXTRACT_CROP_FIGURES | No | Figure/chop cropping toggle | false |
| DUAL_EXTRACT_OLLAMA_MODEL | No | Vision model name | qwen3-vl:30b |
| DUAL_EXTRACT_OLLAMA_THINK | No | Visual route thinking toggle (G2, default off) | false |
| DUAL_EXTRACT_CSV_SPLIT_ROWS | No | CSV split row count | 500 |
| DUAL_EXTRACT_MINERU_TIMEOUT | No | MinerU request timeout in seconds | 120 |
| DUAL_EXTRACT_OLLAMA_TIMEOUT | No | Ollama timeout in seconds; may need to be large for cold start of model loading | 600 |
| DUAL_EXTRACT_CELL_PROVENANCE | No | Table cell provenance (V1.0; when enabled records row/col/value/page/bbox in tables[].cell_provenance, chunked large tables auto-degrade) | false |
| DUAL_EXTRACT_MINERU_BASE_URL | No | MinerU HTTP endpoint | http://127.0.0.1:8000 |
| DUAL_EXTRACT_OLLAMA_BASE_URL | No | Ollama endpoint | http://127.0.0.1:11434 |
| DUAL_EXTRACT_OUTPUT_VERSIONED | No | When true, output adds timestamped subdirectories | false |
| DUAL_EXTRACT_SINGLE_PATH_DEGRADE | No | Single-path degradation toggle | true |
| DUAL_EXTRACT_CONFIDENCE_THRESHOLD | No | Low confidence threshold | 0.7 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| healthA | health tool:MinerU + Ollama 双服务探活。 注意:其余 7 个工具均为 async handler;FastMCP 1.29 对同步 handler
会在 running loop 内直接同步调用,内部再 |
| parse_textC | parse_text tool:MinerU 文本路单跑。 V2.0(additive):新增可选 Args: pdf_path: PDF 路径(必填)。 pages: 页号(int | list[int] | None;1-based)。 verify_pages: 页号(int | list[int] | None;1-based;OvisOCR2 校验页)。 Returns: 结构化 JSON 文本(ParseTextOutput)。 |
| vision_extractB | vision_extract tool:视觉路单跑。 V1.3:新增 Args: pdf_path: PDF 路径(与 image_path 互斥;二者必传其一)。 fields: 字段键(str | list[str] | dict;必填)。 pages: 页号(int | list[int] | None;1-based;图片输入忽略)。 model: 模型名(可选,默认 Settings.ollama_model)。 image_path: 独立图片文件路径(PNG/JPG 等,V1.3 新增)。 Returns: 结构化 JSON 文本(VisionExtractOutput)。 |
| dual_extractB | dual_extract tool:双路融合主入口(M3,T03)。 V2.0(additive):新增可选 Args:
pdf_path: PDF 路径(必填)。
fields: 字段键(str | list[str] | dict;必填,禁止空)。
pages: 页号(int | list[int] | None;1-based)。
model: 视觉模型名(可选,默认 Settings.ollama_model)。
think: 视觉路 thinking 开关(bool | None;None → Settings.ollama_think)。
field_types: Returns: 结构化 JSON 文本(ExtractionOutput)。 |
| extract_tableA | extract_table tool:表格抽取(跨页 + 大表分层,M4,T04)。 Args: pdf_path: PDF 路径(必填)。 pages: 页号(int | list[int] | None;1-based)。 cross_page: 是否跨页合并(bool,默认 true)。 format: 导出格式(str | list[str];json/csv/xlsx 多选;默认 "json")。 render: 是否渲染页图(bool,默认 true)。 Returns: 结构化 JSON 文本(tables.json 汇总)。 |
| extract_formulasA | extract_formulas tool:公式抽取(LaTeX + PNG,M5,T04)。 Args: pdf_path: PDF 路径(必填)。 pages: 页号(int | list[int] | None;1-based)。 render: 是否渲染 PNG(bool,默认 true)。 tex: 是否落盘 formulas.tex(bool,默认 false)。 sympy: 是否做 SymPy 校验(bool,默认 false)。 Returns: 结构化 JSON 文本(formulas.json 汇总)。 |
| inspect_documentC | inspect_document tool:文档探查(M6,P1,轻量)。 Args: pdf_path: PDF 路径(必填)。 Returns: 结构化 JSON 文本(PRD §4.6:pages/tables/images/formulas/text_chars)。 |
| validate_outputB | validate_output tool:输出结构校验(M6,C1)。 Args: output_dir: 待校验目录(绝对或相对路径;必须位于输出根内)。 Returns:
结构化 JSON 文本( |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
The extraction tools are separated by pipeline (text, vision, dual), and table/formula/inspection/validation/health tools occupy distinct roles. The only mild ambiguity is among parse_text, vision_extract, and dual_extract, but their descriptions clearly label them as separate routes.
Most tools follow a verb_noun pattern: inspect_document, validate_output, parse_text, vision_extract, extract_table, extract_formulas. Minor inconsistencies exist: health is a bare noun, and parse_text uses 'parse' while others use 'extract'.
8 tools is well-scoped for a PDF dual-extraction service: one preflight inspector, three extraction routes, two specialized extractors, one output validator, and one health check. No tool feels redundant.
The tool surface covers the full workflow: inspect_document preflights, parse_text/vision_extract/dual_extract handle text/vision/fusion extraction, extract_table and extract_formulas cover specialized content, validate_output closes the loop, and health covers service dependencies. No critical dead-end or missing operation is apparent.