Skip to main content
Glama

scan_folder

Read-onlyIdempotent

List documents in a folder using stat info only, without opening files. Filter by extension and subfolders to quickly identify candidates for deeper analysis.

Instructions

폴더 안의 대상 문서를 목록화합니다. 파일을 열지 않습니다.

stat 정보만 보므로 큰 폴더에서도 빠릅니다. 대신 스캔 PDF와 텍스트 PDF를 구분할 수 없습니다 — expected_gradeB?인 파일은 inspect_document로 확정하세요.

개수는 코드가 셉니다. total_matchedreturned가 다르면 truncated가 True이고, 범위를 좁혀 다시 호출해야 합니다.

Args: folder: root 절대경로 또는 root 기준 상대경로. recursive: 하위 폴더 포함 여부. extensions: 확장자 필터.

Returns: ScanFolderResponse: entries[]와 확장자별·등급별 집계.

Examples: - 사용: "이 폴더에 뭐가 들어 있나요?" / 분석 대상을 고르기 전 - 사용하지 않음: 특정 파일의 페이지 수·제목 구조가 필요할 때 → inspect_document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
folderNo스캔할 폴더. list_allowed_roots의 root 절대경로거나, root 기준 상대경로('보고서/2026')입니다. root 자체를 훑으려면 '.'.
recursiveNo하위 폴더까지 훑을지 여부
extensionsNo좁히고 싶을 때만 지정합니다. 예: ['.pdf', '.pptx']. None이면 서버가 여는 모든 형식

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootYes
stageYes분석 워크플로에서 지금 위치한 단계
folderYesroot 기준 상대 경로
statusYes이 호출의 결과 상태
entriesYes
returnedYes이 응답에 실제로 담긴 개수
recursiveYes
truncatedYesTrue면 total_matched만큼 다 담지 못했습니다
by_extensionYes확장자별 개수. 코드가 센 값입니다
next_actionsNo이어서 호출하면 좋은 도구 목록
total_matchedYes조건에 맞는 파일 총 개수 (절단 전)
unreadable_dirsYes권한 등으로 열지 못한 폴더 이름
by_expected_gradeYes추정등급별 개수
skipped_unsupportedYes다루지 않는 확장자여서 건너뛴 개수
skipped_outside_rootYes링크 등으로 실경로가 root 밖이거나 읽을 수 없어 제외한 개수
Behavior5/5

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

Annotations already cover read-only and non-destructive behavior, but the description goes beyond them by disclosing that it does not open files, uses stat info only (hence fast), cannot distinguish scanned vs text PDFs, and that truncation occurs when total_matched != returned. These are non-obvious behaviors an agent needs to know to interpret results correctly.

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 clear sections (Args, Returns, Examples) and front-loaded with the primary purpose and speed caveat. It is slightly longer than strictly necessary, but every sentence contributes either to usage guidance or behavioral transparency. The use of bold and code formatting aids readability without padding.

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?

With an output schema present, the description correctly focuses on when to use, limitations, truncation handling, and sibling routing. It covers all operational concerns an agent would have: speed, PDF-type ambiguity, pagination/truncation, and path conventions. Nothing critical is missing for correct invocation.

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?

The input schema already documents all three parameters with full coverage (100%). The description does not add new semantic value beyond restating parameter purposes; it does give usage context for extensions (optional filter) and the folder default, but these are also in the schema. This matches the baseline for high schema coverage.

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 ('list') and resource ('documents in a folder'), and immediately distinguishes itself from siblings by noting it does not open files. It also clarifies it only reads stat information, which sets it apart from inspect_document. This is a clear, non-tautological purpose statement.

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 when-to-use ('what's in this folder?' before selecting analysis targets) and when-not-to-use (when page count or title structure is needed → inspect_document). It also gives a conditional routing rule: if expected_grade is 'B?', use inspect_document. This is comprehensive usage guidance with named alternatives.

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