Skip to main content
Glama
skaosqkf0-del

file-analyzer-mcp

read_pdf

Read-onlyIdempotent

Extract page-by-page text from PDF files. Specify page ranges to read large documents efficiently, and enable OCR to handle scanned, textless pages.

Instructions

PDF에서 페이지별 텍스트를 추출한다.

긴 PDF는 컨텍스트를 아끼기 위해 page_start/page_end로 범위를 지정해 나눠 읽으세요. page_end를 생략하면 기본 상한(30페이지)까지만 읽고, 그 이상은 truncated 여부 대신 total_pages와 end_page 차이로 알 수 있습니다.

Args: file_path: PDF 파일 경로. page_start: 시작 페이지 (기본 1). page_end: 끝 페이지. 생략 시 최대 30페이지. ocr: 텍스트 레이어가 없는 페이지를 OCR로 보강할지 여부 (기본 False, 느립니다). ocr_lang: OCR 언어 코드 (기본 'kor+eng').

Returns: ReadPdfResponse: pages[]에 페이지별 text와 text_source ('extracted'/'ocr'/'empty'). likely_scanned가 True면 원래 텍스트 레이어가 없는 스캔본 — ocr=True로 다시 호출하면 내용을 읽을 수 있습니다.

Raises: ToolFailure: PATH_NOT_FOUND / NOT_A_FILE / FILE_TOO_LARGE / UNSUPPORTED_EXTENSION / OCR_ENGINE_NOT_FOUND.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ocrNoTrue면 텍스트 레이어가 없는 페이지를 Tesseract OCR로 다시 읽습니다. 스캔본 PDF에서만 켜세요 — 텍스트 레이어가 있는 페이지는 그대로 추출을 씁니다.
ocr_langNoOCR 언어 코드. 기본 'kor+eng'(한국어+영어 동시 인식)kor+eng
page_endNo끝 페이지. 생략하면 문서 끝까지(단, 기본 상한 30페이지)
file_pathYes읽을 .pdf 파일 경로
page_startNo시작 페이지(1부터)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagesYes
statusYes이 호출의 결과 상태
end_pageYes
metadataYes
file_pathYes
start_pageYes
total_pagesYes
next_actionsNo이어서 호출하면 좋은 도구 목록
likely_scannedYesTrue면 텍스트 레이어가 없는 스캔 이미지 PDF로 추정됨. 이 서버는 OCR을 수행하지 않으므로 요약이 불가능합니다.
Behavior5/5

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

Discloses the default 30-page cap, the truncation detection method (total_pages vs end_page), OCR slowness, return structure (ReadPdfResponse with pages, text_source, likely_scanned), and specific error types (PATH_NOT_FOUND, FILE_TOO_LARGE, etc.). Adds meaningful context beyond the readOnly/idempotent annotations and covers operational nuances.

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?

Well-structured with clear sections: purpose, usage advice, Args, Returns, Raises. Front-loaded with purpose and usage guidance. Every sentence contributes value; no filler or redundancy. The length is justified by the tool's complexity.

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

Completeness5/5

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

Covers input (file_path), pagination behavior, OCR details, return value structure, and error conditions. The presence of an output schema and complete parameter descriptions means nothing essential is missing. An agent can invoke the tool correctly with this description 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 covers all 5 parameters with descriptions (100% coverage). The description adds behavior beyond the schema: the default page_end cap of 30, the OCR slowness warning, and the guidance to re-call with ocr=True when likely_scanned. This supplements the schema with practical usage details.

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?

States a specific verb (extracts), resource (PDF), and scope (page-by-page text). Distinguishes from sibling tools like read_pptx and read_docx which handle different file formats. The purpose is unambiguous and directly actionable.

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?

Explicitly instructs using page_start/page_end for long PDFs to save context and explains the default 30-page limit with truncation detection via total_pages vs end_page. Also advises calling with ocr=True when likely_scanned is true. Does not explicitly contrast with sibling tools, but the file-type difference is implied and the guidance is concrete.

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/skaosqkf0-del/MCP_test'

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