Skip to main content
Glama

parse_text

Extract structured JSON text and layout from local PDFs with optional page targeting and OCR verification. Enables dual-extract document understanding, tables, formulas, and validation offline.

Instructions

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)。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesNo
pdf_pathYes
verify_pagesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

C2.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It does not mention side effects, permissions, rate limits, or how the tool interacts with the PDF. It only states that it returns structured JSON, which is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is structured with Args and Returns, but includes jargon like '信号②' and '触发规则自行判定' that are unclear to a general agent. It is not excessively long but could be tightened and made more accessible.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no explicit purpose statement, the description is incomplete. It does not explain what happens on invalid pages, error handling, or how the output relates to the input. An agent cannot fully predict behavior from this alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains pdf_path as required, pages and verify_pages as int/list/None with 1-based indexing, and clarifies verify_pages is for OvisOCR2 validation. This adds meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'MinerU 文本路单跑' which is a vague pipeline reference rather than a clear statement of what the tool does. It mentions returning structured JSON but never explicitly says it extracts or parses text from a PDF, leaving the core action ambiguous for an agent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use parse_text versus siblings like vision_extract, dual_extract, extract_table, or extract_formulas. No conditions, exclusions, or alternative routing are mentioned, so an agent cannot determine the appropriate context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.