Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
DUAL_EXTRACT_PARALLELNoPage parallelism (default serial to prevent 3090 OOM)false
DUAL_EXTRACT_TEMP_DIRNoTemporary directory (cleaned on exit)./tmp
DUAL_EXTRACT_IMAGE_DPINoPage image / image DPI200
DUAL_EXTRACT_LOG_LEVELNoLog levelINFO
DUAL_EXTRACT_MAX_PAGESNoMaximum page count1000
DUAL_EXTRACT_OUTPUT_DIRNoOutput root directory (absolute path recommended)./outputs
DUAL_EXTRACT_MAX_FILE_MBNoMaximum input PDF size in MB500
DUAL_EXTRACT_MODEL_JUDGENoModel judge (default off, not implemented before v0.4)false
DUAL_EXTRACT_CROP_FIGURESNoFigure/chop cropping togglefalse
DUAL_EXTRACT_OLLAMA_MODELNoVision model nameqwen3-vl:30b
DUAL_EXTRACT_OLLAMA_THINKNoVisual route thinking toggle (G2, default off)false
DUAL_EXTRACT_CSV_SPLIT_ROWSNoCSV split row count500
DUAL_EXTRACT_MINERU_TIMEOUTNoMinerU request timeout in seconds120
DUAL_EXTRACT_OLLAMA_TIMEOUTNoOllama timeout in seconds; may need to be large for cold start of model loading600
DUAL_EXTRACT_CELL_PROVENANCENoTable 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_URLNoMinerU HTTP endpointhttp://127.0.0.1:8000
DUAL_EXTRACT_OLLAMA_BASE_URLNoOllama endpointhttp://127.0.0.1:11434
DUAL_EXTRACT_OUTPUT_VERSIONEDNoWhen true, output adds timestamped subdirectoriesfalse
DUAL_EXTRACT_SINGLE_PATH_DEGRADENoSingle-path degradation toggletrue
DUAL_EXTRACT_CONFIDENCE_THRESHOLDNoLow confidence threshold0.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

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
healthA

health tool:MinerU + Ollama 双服务探活。

注意:其余 7 个工具均为 async handler;FastMCP 1.29 对同步 handler 会在 running loop 内直接同步调用,内部再 asyncio.run 会嵌套报错, 故此处统一为 async + await(health_service.check 仍保留同步兜底)。

parse_textC

parse_text tool:MinerU 文本路单跑。

V2.0(additive):新增可选 verify_pages —— 调用级显式指定 OvisOCR2 校验页(信号②;未指定/未启用 → 触发规则自行判定,默认零调用)。

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:新增 image_path 参数(独立图片输入,与 pdf_path 互斥二选一)。

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):新增可选 verify_pages —— 调用级显式指定 OvisOCR2 校验页(信号②;未指定/未启用 → 触发规则自行判定,默认零调用)。

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: {字段键: 字段类型}(可选;未指定按值形态推断)。 verify_pages: 页号(int | list[int] | None;1-based;OvisOCR2 校验页)。

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 文本({ok, errors, manifest_ok})。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.3/5.0

Scored across 8 tools

Disambiguation4/5

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.

Naming Consistency4/5

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'.

Tool Count5/5

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.

Completeness5/5

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.

Maintenance

ActivitySlowing
ResponsivenessNo issues