Skip to main content
Glama

inspect_document

Read-onlyIdempotent

Check a document's structure and confirmed grade before reading it, saving context by avoiding full text loading. Use it to verify scan or text type and plan read_document calls.

Instructions

본문 없이 구조와 확정 등급만 돌려줍니다.

read_document 전에 부르세요. 300페이지 PDF에서 "이게 어떻게 생긴 문서인지"를 알려고 본문 전체를 컨텍스트에 붓는 일을 막는 도구입니다.

scan_folderexpected_grade는 확장자 추정값이라 pdf·svgB?로 남습니다. 이 도구가 파일을 열어서 확정합니다. 스캔 PDF와 텍스트 PDF가 여기서 갈립니다.

파일을 여는 비용은 read_document와 같습니다. 절약되는 것은 시간이 아니라 컨텍스트입니다.

Args: path: 분석할 파일.

Returns: InspectResponse: 확정 등급과 근거, 제목 트리, 블록 수, 본문 글자 수, 전체를 읽는 데 필요한 호출 횟수 추정, 이미지 판독이 필요한 블록 앵커, 형식별 메타.

Examples: - 사용: 큰 PDF를 읽기 전에 페이지 수와 목차를 확인할 때 - 사용: scan_folder가 'B?'를 돌려줬고 스캔 여부를 알아야 할 때 - 사용하지 않음: 본문 내용이 필요할 때 → read_document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesscan_folder가 돌려준 상대 경로, 또는 root 안의 절대 경로

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaYes형식별 메타 (표 개수, 슬라이드 수 등)
pathYes
unitYes이 형식에서 블록 하나가 무엇인지
gradeYes**확정된** 추출가능등급. A=구조까지, B=본문만, C=텍스트 없음. scan_folder의 expected_grade와 달리 파일을 열어서 판정한 값입니다
stageYes분석 워크플로에서 지금 위치한 단계
statusYes이 호출의 결과 상태
outlineYes제목 트리. 없는 형식은 빈 목록
modifiedYes마지막 수정 시각 (ISO 8601)
extensionYes
size_bytesYes
text_charsYes본문 총 글자 수 (앵커 제외)
unit_countYes원래 단위의 개수 (총 페이지·슬라이드 수 등)
grade_reasonYes그 등급으로 판정한 근거
next_actionsNo이어서 호출하면 좋은 도구 목록
total_blocksYesread_document로 읽을 수 있는 블록 수
outline_truncatedYesTrue면 제목이 너무 많아 잘렸습니다
blocks_needing_imageYes텍스트가 없어 read_document_image로 판독해야 하는 블록의 앵커. 예: ['p3', 'p7']. 최대 50개까지
estimated_read_callsYes전체를 읽는 데 필요한 read_document 호출 횟수 (상한 기준 추정)
Behavior4/5

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

Annotations provide readOnlyHint=true, idempotentHint=true, destructiveHint=false, covering the safety profile. The description adds valuable context beyond these: it discloses that opening the file costs the same as read_document but saves context, not time, and that it distinguishes scanned vs text PDFs. It doesn't describe pagination or response size details, but the output schema exists and the safety profile is already covered by annotations, so the added disclosure is meaningful.

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 well-structured with front-loaded purpose ('본문 없이 구조와 확정 등급만 돌려줍니다'), followed by usage guidance, cost disclosure, args, return types, and examples. Every sentence earns its place – the cost disclosure and the scan-vs-text distinction are critical differentiators that an agent needs. The examples section with explicit 사용/사용하지 않음 cases is particularly efficient.

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?

Complete for a single-parameter read-only inspection tool. The output schema lists the return fields (grade, rationale, title tree, block count, char count, estimated call count, image-required anchors, format metadata), so the description needn't explain return values further. The cost/context tradeoff, the B? resolution flow, and the scan-vs-text distinction are all covered. An agent has everything needed to call it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema fully documents the single path parameter, including that it must be a relative path from scan_folder or an absolute path within root. The description's Args section adds nothing beyond the schema. Baseline 3 is appropriate since the schema carries the load and the description repeats it without adding new semantic detail.

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 states a specific verb+resource: inspects a document to return only its structure and confirmed grade, without the body text. It clearly differentiates from read_document by emphasizing it is to be called before it, and from scan_folder by explaining that it replaces extension-based 'B?' guesses with a confirmed grade. The purpose cannot be confused with siblings.

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 gives explicit when-to-use instructions ('read_document 전에 부르세요'), specific use cases with examples (checking page count/TOC before reading a large PDF, resolving a 'B?' from scan_folder), and a clear when-not-to-use case (when body text is needed, use read_document). Alternatives are named directly, leaving nothing to inference.

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/goods9999-ai/personal-file-analysis-mcp_test_20260826'

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