Skip to main content
Glama
JaeHyeon-KAIST

pdf2zh-next-mcp

extract_segments

Extract all text segments from a PDF for translation in one pass, preserving document context. Returns a session directory to check completion asynchronously.

Instructions

PDF 파일에서 번역 대상 세그먼트를 추출합니다.

백그라운드에서 비동기로 실행됩니다. 반환된 session_dir로 check_extraction_status를 호출하여 완료 여부를 확인하세요.

Args: file: PDF 파일의 로컬 절대 경로. 예: /Users/username/Downloads/paper.pdf 주의: 반드시 사용자가 메시지에 입력한 로컬 경로를 사용하세요. 첨부 파일의 내부 경로(/mnt/user-data/uploads/...)는 사용할 수 없습니다. lang_in: 원본 언어 코드 (기본값: en) lang_out: 번역 대상 언어 코드 (기본값: ko) output_dir: 출력 디렉토리 경로. 비어 있으면 입력 PDF와 같은 디렉토리에 저장. pages: 번역할 페이지 범위. 비어 있으면 전체 페이지. 형식: '1-7,10' (17, 10페이지), '-5' (15), '3-' (3~끝). 참고문헌 등 특정 페이지를 제외하고 싶을 때 사용하세요.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
pagesNo
lang_inNoen
lang_outNoko
output_dirNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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. It discloses the asynchronous behavior, the returned session_dir, default parameter values, and page-range syntax. It does not cover error conditions or side effects on existing files, but it covers the main behavioral traits comprehensively.

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

Conciseness4/5

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

The description is well-structured with an intro, async note, and a clear Args list. It is slightly verbose due to the path warning and examples, but each sentence contributes necessary information.

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

Completeness4/5

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

Given the tool's complexity (async, five parameters, output schema), the description covers the essential invocation requirements: what to pass, the async flow with session_dir, and next-step status checking. It omits error handling, but is sufficient for correct tool selection and invocation.

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

Parameters5/5

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

The input schema has zero descriptions, but the description fully compensates by detailing every parameter: file with a path example and restriction, lang_in/lang_out with defaults, output_dir behavior, and pages with format examples ('1-7,10', '-5', '3-'). This adds significant meaning beyond the raw schema.

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 it 'extracts segments to be translated from a PDF file' and differentiates itself by noting the asynchronous execution and the need to call check_extraction_status for completion. This makes it distinct from sibling tools like save_translated_segments or assemble_translated.

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

Usage Guidelines4/5

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

It provides explicit guidance to call check_extraction_status after obtaining session_dir, and includes a critical warning about using local file paths instead of attached internal paths. It does not mention exclusions or alternatives explicitly, but the pipeline context is clear enough.

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/JaeHyeon-KAIST/pdf2zh-next-mcp'

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