Skip to main content
Glama

doc2x_parse_pdf_wait_text

Extract text from PDF documents by waiting for parsing completion, returning merged content with configurable output limits for processing.

Instructions

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uidNoDoc2x parse task uid returned by doc2x_parse_pdf_submit.
pdf_pathNoAbsolute 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_msNo
max_wait_msNo
join_withNo
max_output_charsNoMax 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_pagesNoMax pages to merge into returned text (0 = unlimited). Default can be set via env DOC2X_PARSE_PDF_MAX_OUTPUT_PAGES.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: waiting until success, caching/reuse logic with uid/pdf_path, and the two-step process (submit then wait if needed). It mentions returning merged text but lacks details on error handling, timeout behavior, or output format specifics, which keeps it from a perfect score.

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

Conciseness5/5

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

The description is efficiently structured in two sentences: the first states the core purpose, and the second explains the parameter logic. Every phrase adds value, with no redundant or vague language, making it easy to parse and understand quickly.

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

Completeness3/5

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

Given the tool's complexity (7 parameters, no annotations, no output schema), the description is adequate but incomplete. It covers the core purpose and parameter interplay well, but lacks details on error cases, timeout handling, output format, or performance implications (e.g., what 'wait' entails). For a tool with no output schema, more on return values would be helpful.

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 57% (4 of 7 parameters have descriptions), so the description must compensate. It adds meaningful context for uid and pdf_path by explaining their interaction (prefer uid, reuse cached uid or submit new task), which goes beyond the schema's basic descriptions. However, it doesn't address poll_interval_ms, max_wait_ms, join_with, or the output-limiting parameters, leaving some gaps.

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

Purpose5/5

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

The description clearly states the tool's purpose with specific verbs ('wait', 'return merged text') and resource ('PDF parse task'), distinguishing it from siblings like doc2x_parse_pdf_submit (which submits) and doc2x_parse_pdf_status (which checks status). It explicitly mentions waiting for success and returning text, which is unique among the parse-related tools.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool vs. alternatives: it advises preferring uid to avoid re-submission and explains the fallback behavior with pdf_path. It distinguishes from siblings by implying this is for waiting on parse tasks, not submitting or checking status, though it doesn't name specific alternatives beyond the uid reference.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NoEdgeAI/doc2x-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server