Skip to main content
Glama
file-analysis-mcp

file-analysis-mcp

file-analysis-mcp

«Lee y resume todos los documentos pdf/docx/pptx/svg/png de esta carpeta.» Un servidor MCP personal para que Claude Code cumpla esa única petición.

Python 3.11+ MCP read--only tests

Cuando se le indica una carpeta, abre los documentos que contiene y extrae solo el texto tal cual. El resumen y la interpretación no los hace este servidor, sino Claude, que lo invoca durante la conversación; por eso funciona completamente en local y de forma privada, sin necesidad de una clave API de LLM.


Índice


Related MCP server: file-analyzer

Cómo funciona en realidad

Este es el resultado de pedírselo a Claude Code con una carpeta real (una carpeta con documentos PRD internos).

Yo: resume los documentos de la carpeta docs y analiza la estructura de archivos

Claude llama sucesivamente a analyze_folder_structure → analyze_folder y, basándose en el texto original devuelto, responde así.

[analyze_folder_structure] pdf 2개, 총 455KB, 최대 파일 prd.pdf(231KB)
[analyze_folder]           2개 파일 모두 추출 성공 (succeeded: 2, failed: 0)

→ Claude의 요약:
두 문서는 같은 프로젝트("ParameterCheck")의 서로 다른 산출물입니다.
- proposal.pdf: RF솔루션 파트의 CAB 파라미터 검증 자동화 기획서
- prd.pdf: 같은 아이디어의 정식 PRD. 목표는 검증 시간 10분→5분 단축,
  MVP는 "파라미터 엑셀 입력 시 집계시트 자동 생성 + 오류 빨강 표시"
공통점: 사람 검토·승인은 항상 최종 단계로 남겨둔다는 원칙이 두 문서 모두에 명시됨.

El servidor solo pasó el texto; todas las frases del resumen anterior las creó Claude. Esta es la separación de roles que persigue este proyecto.

Inicio rápido

# 1) 의존성 설치 (uv 사용)
uv sync --extra dev

# 2) 확인
uv run pytest                        # 유닛테스트
uv run python scripts/smoke_stdio.py # 실제 MCP 프로토콜로 서버를 띄워보는 스모크 테스트

Si necesitas OCR (análisis de PNG), instala Tesseract-OCR por separado; más abajo, en la parte inicial de Registro en Claude Code, tienes las instrucciones. Las otras 4 herramientas funcionan con normalidad incluso sin instalarlo.

Las 5 herramientas

Herramienta

Descripción

Salvaguarda

scan_folder

Devuelve la lista de archivos objetivo de la carpeta (ruta/tamaño/fecha de modificación) y el recuento por extensión

Cuando supera max_files (por defecto 300), list_truncated=True

analyze_folder_structure

Devuelve la estructura de árbol con subcarpetas, estadísticas por extensión, tamaño y lista de los archivos más grandes

Solo el árbol se limita con max_files (las estadísticas siempre son globales)

read_document

Extrae el texto de un solo documento pdf/docx/pptx/svg

Trunca con max_chars y lo indica con truncated=True

read_image_text

Lee una sola imagen png con OCR y extrae su texto

Igual que el anterior + si el resultado del OCR está vacío, indica el motivo en next_actions

analyze_folder

Extrae a la vez todos los archivos objetivo de la carpeta y lo devuelve como informe (no hace falta llamarlo varias veces)

Cuando supera max_files (por defecto 50), indica el número con skipped_due_to_limit

Todas las herramientas son de solo lectura y no modifican ni eliminan archivos. Aunque se alcance el límite (max_files), no omiten archivos en silencio; dejan constancia en la respuesta de cuántos no se pudieron ver, y status pasa a ser PARTIAL para que lo sepas de inmediato.

Registro en Claude Code

Instalación del motor OCR (solo necesario para el análisis de PNG)

pytesseract no es más que el binding de Python para el motor Tesseract-OCR; el motor en sí debe instalarse por separado.

  1. Descarga e instala en Windows la compilación de Tesseract de UB-Mannheim. (Si necesitas reconocer coreano, marca Korean en "Additional language data" durante la instalación).

  2. Añade la ruta de instalación (por defecto C:\Program Files\Tesseract-OCR) a la variable de entorno PATH del sistema.

  3. Comprueba la instalación con tesseract --version.

Registro del servidor

Este repositorio ya incluye un .mcp.json en la raíz. Si ejecutas Claude Code en la carpeta file-analysis-mcp (o en una carpeta superior), se detectará automáticamente. Tras reiniciar, comprueba que ves las 5 herramientas de file-analysis en el comando /mcp o en la lista de herramientas.

Para registrarlo manualmente:

claude mcp add file-analysis -- uv --directory "C:\Users\20223\Desktop\file-analysis-mcp" run python src/file_analysis_mcp/server.py

Flujo recomendado: primero entiende la estructura con analyze_folder_structure → extrae el texto completo de los documentos con analyze_folder → Claude resume a partir del texto extraído.

Estructura del proyecto

file-analysis-mcp/
├── pyproject.toml
├── .mcp.json
├── src/file_analysis_mcp/
│   ├── server.py        # FastMCP 서버, 도구 5개
│   ├── harness.py        # 응답/오류 계약 (BaseResponse, ToolFailure 등)
│   ├── scanner.py         # 폴더 스캔/구조 분석
│   └── extractors/        # pdf/docx/pptx/svg/image 텍스트 추출기
├── scripts/smoke_stdio.py
├── tests/
│   ├── test_scanner.py           # 도메인 로직(순수 함수) 유닛테스트
│   ├── test_extractors.py        # 포맷별 추출기 유닛테스트
│   └── test_server_contract.py   # 하네스 규약(도구 계약) 테스트
└── data/sample_docs/       # 테스트용 샘플 문서

Principio de diseño: ingeniería de arnés

Este servidor prioriza hacer que el modelo, con solo ver la respuesta, sepa qué hacer a continuación por encima de "añadir más funcionalidades". De los principios presentados en awesome-harness-engineering, hemos aplicado selectivamente solo los que encajan con el carácter de este proyecto: local, de un solo usuario y de solo lectura. (La observabilidad con OpenTelemetry, el sandboxing contra inyección de prompts o el gating de aprobación de alcance tipo mcp-guardian están pensados para agentes multiusuario y de larga ejecución; resultan excesivos para una herramienta personal de este tamaño, así que no se han aplicado).

Lo aplicado

Forma en este proyecto

Límites claros de las herramientas

En el docstring de cada herramienta se indica el propósito + Returns + ejemplos de "usar / no usar", para que el modelo elija la correcta entre las 5 herramientas

Orientación para la siguiente acción

Todas las respuestas incluyen status + next_actions. Según la situación (éxito, éxito parcial, resultado vacío, etc.), sugiere de forma concreta qué herramienta llamar después y por qué.

Errores accionables

ToolFailure impone un código de causa + método de recuperación + valores permitidos. Por ejemplo: extensión no compatible → lista de extensiones disponibles

Ahorro de contexto (respuestas individuales)

read_document/read_image_text/analyze_folder truncan con max_chars (por archivo) y lo señalan con truncated

Ahorro de contexto (salvaguardas)

scan_folder/analyze_folder_structure/analyze_folder tienen un límite en el número de archivos (max_files), de modo que una sola llamada no crezca indefinidamente aunque la carpeta tenga muchísimos archivos.

Mantener el fallo útil en el contexto

analyze_folder no detiene el lote aunque falle un archivo; deja registrado el éxito/fallo por archivo para que la decisión del siguiente paso se base en ello.

Prohibida la pérdida silenciosa

Aunque se supere el límite, no se saltan archivos a escondidas; la respuesta indica exactamente cuántos no se pudieron ver mediante list_truncated/skipped_due_to_limit.

Pruebas del contrato de las herramientas

tests/test_server_contract.py verifica mediante código: "¿todas las herramientas tienen descripción/annotations?", "¿el esquema de argumentos es plano?", "¿todas las herramientas son de solo lectura?", "¿las salvaguardas funcionan de verdad?"

Lo que se ha decidido no aplicar

  • Resumen/grounding (verificación de fuentes): no aplica, porque este servidor está diseñado para "solo extraer" (el resumen corresponde al modelo anfitrión).

  • Anclas de cita con número de línea (L12 | ...): no se han aplicado porque, sin una herramienta aparte que verifique la base de las citas, solo ensucian el texto. Si llegaran a hacer falta, se pueden añadir reutilizando harness.number_lines().

  • Flujo de guardado basado en tokens de aprobación: no aplica, porque este servidor no escribe archivos.

Available Tools

5 tools
analyze_folderA
Read-onlyIdempotent

폴더 안의 모든 대상 파일(pdf/docx/pptx/svg/png)을 한 번에 추출해 리포트로 반환합니다.

파일마다 read_document/read_image_text를 따로 호출하지 않아도 되는 배치 도구입니다. 한 파일이 실패해도 나머지 파일 처리는 계속되며, 실패 이유는 파일별로 남습니다. 파일 수가 max_files를 넘으면 앞쪽부터 max_files개만 처리하고, 넘겨받지 못한 개수는 skipped_due_to_limit로 투명하게 알려줍니다(조용히 누락되지 않습니다).

Returns: AnalyzeFolderResponse: reports[]의 각 항목은 status(OK/ERROR)와 함께 text 또는 error를 담습니다. status가 PARTIAL이면 일부 실패했거나(failed>0) 상한 때문에 스킵된 파일(skipped_due_to_limit>0)이 있다는 뜻입니다.

Examples: - 사용: "이 폴더 문서들 다 요약해줘", "폴더 구조 분석하고 내용도 정리해줘" - 사용하지 않음: 파일 목록만 필요할 때 → scan_folder - 사용하지 않음: 특정 파일 하나만 자세히 → read_document / read_image_text

NameRequiredDescriptionDefault
max_filesNo이번 호출에서 실제로 추출을 시도할 최대 파일 수(컨텍스트/시간 보호용 상한). 초과분은 시도조차 하지 않고 skipped_due_to_limit로 개수를 알려줍니다.
recursiveNo하위 폴더까지 재귀적으로 탐색할지 여부
extensionsNo필터링할 확장자 목록. 생략하면 pdf/docx/pptx/svg/png 전체를 대상으로 함
folder_pathYes분석할 폴더의 절대 경로
max_chars_per_fileNo파일당 반환할 최대 문자 수(컨텍스트 보호용 절단)

Output Schema

NameRequiredDescription
failedYes
folderYes
statusYesOK 또는 PARTIAL 등 처리 결과 상태
reportsYes
succeededYes
total_filesYes실제로 추출을 시도한 파일 수 (= len(reports))
next_actionsNo
total_matchedYes조건에 맞는 전체 파일 수(상한 적용 전)
skipped_due_to_limitYesmax_files 상한 때문에 시도조차 하지 않은 파일 수

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint as safe. The description goes beyond by revealing that it is a batch tool that continues processing on per-file errors, transparently reports skipped files via skipped_due_to_limit, and returns statuses (OK/ERROR/PARTIAL). This adds significant behavioral context not present in annotations.

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: main purpose first, followed by batch/error/limit behavior, then return format, then examples. It is somewhat lengthy but every section adds value, including explicit '사용' and '사용하지 않음' examples. The front-loading of the core purpose is effective.

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?

Given the tool's complexity (5 parameters, output schema present), the description covers all essential aspects: batch semantics, failure handling, limit transparency, return structure, and usage alternatives. It also includes practical example prompts. Nothing an agent needs to correctly invoke the tool is missing.

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 provides complete descriptions for all 5 parameters (100% coverage), so the baseline is 3. The description does not add new meaning to parameters beyond repeating max_files' skipped_due_to_limit behavior, which is already in the schema. No additional semantic value is provided.

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 extracts all target files (pdf/docx/pptx/svg/png) in a folder and returns a report. It explicitly distinguishes itself from siblings: scan_folder (file list only) and read_document/read_image_text (single file). The verb '추출' and resource '폴더' make the purpose specific and unambiguous.

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 explicitly states when to use the tool (batch extraction, folder document summarization) and when not to use it, naming the alternatives: scan_folder for file lists and read_document/read_image_text for individual files. It also clarifies behavior under max_files limit and partial failures, leaving no ambiguity about invocation context.

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

analyze_folder_structureA
Read-onlyIdempotent

폴더의 하위 디렉터리 트리와 확장자별 통계, 용량, 최대 파일을 분석합니다.

scan_folder보다 한 단계 더 깊은 "구조" 파악용 도구입니다. 폴더가 어떻게 구성돼 있는지(하위 폴더별 파일 분포, 가장 큰 파일 등)를 먼저 감 잡고 싶을 때 사용하세요.

Returns: FolderStructureResponse: tree는 {"하위폴더명": {...}, "_files": [...]} 형태의 중첩 딕셔너리입니다. 파일이 max_files보다 많으면 tree에는 앞쪽 max_files개만 반영되고 list_truncated=True가 되지만, total_files/ by_extension/total_size_bytes 등 통계는 항상 전체 파일 기준입니다.

Examples: - 사용: "이 폴더 구조 좀 분석해줘", "가장 큰 파일이 뭐야?" - 사용하지 않음: 파일 목록만 빠르게 보고 싶을 때 → scan_folder

NameRequiredDescriptionDefault
max_filesNo트리(tree)에 포함할 최대 파일 수(컨텍스트 보호용 상한). 통계(개수/용량 등)는 상한과 무관하게 항상 전체 기준입니다.
extensionsNo필터링할 확장자 목록. 생략하면 pdf/docx/pptx/svg/png 전체를 대상으로 함
folder_pathYes분석할 폴더의 절대 경로

Output Schema

NameRequiredDescription
treeYes
folderYes
statusYesOK 또는 PARTIAL 등 처리 결과 상태
max_depthYes
total_filesYes조건에 맞는 전체 파일 수(통계는 항상 전체 기준)
by_extensionYes
next_actionsNo
largest_filesYes
list_truncatedYes파일이 너무 많아 tree에는 max_files개까지만 반영됐으면 True
total_size_bytesYes

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, and non-destructive. The description adds crucial behavioral detail beyond that: it explains that the tree includes only up to max_files entries with list_truncated flag, while statistics are always based on the full file set. It also details the default extension set when no filter is given. No contradiction with annotations; this transparency is valuable.

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-organized: opens with the core purpose, then a usage hint, a Returns section, and examples. Each section contributes to understanding, though it is slightly longer than strictly necessary. The structure is front-loaded with the main purpose and comparison, making it easy to skim. Optimally concise for the complexity it covers.

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 and safety annotations provided, the description still adds essential behavioral details (truncation semantics, stats being global) and usage examples. It covers the necessary context for correct invocation, including how max_files affects results and the default extension pool. No missing critical information for typical usage.

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%, with each parameter already having detailed descriptions (folder_path as absolute path, max_files with truncation explanation, extensions with default set). The tool description does not add supplementary meaning beyond the schema; it neither repeats nor enhances parameter semantics, so the baseline 3 applies.

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

Purpose4/5

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

The description clearly states it analyzes the folder's subdirectory tree, extension statistics, size, and largest files, with a specific verb and resource. It distinguishes itself from scan_folder by noting it goes one level deeper into structure. However, it does not differentiate from the similarly named sibling analyze_folder, which could create ambiguity about which tool to use.

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?

The description provides explicit guidance: use it when you need an understanding of folder organization (subfolder distribution, largest files) and explicitly says not to use it when you only need a quick file list, directing to scan_folder. However, it omits any comparison with analyze_folder, another sibling that might be a relevant alternative, leaving some usage ambiguity.

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

read_documentA
Read-onlyIdempotent

문서 파일(pdf/docx/pptx/svg) 하나의 텍스트를 추출합니다. 요약은 하지 않습니다.

scan_folder/analyze_folder에서 찾은 파일 중 하나를 더 자세히 보고 싶을 때, 또는 analyze_folder의 일괄 요약이 잘렸을 때(truncated=True) 이어서 읽을 때 씁니다.

Returns: ReadDocumentResponse: text에 원문(잘렸으면 앞부분)이 담깁니다. truncated=True면 max_chars를 늘려 다시 호출해 나머지를 볼 수 있습니다.

Examples: - 사용: "이 pdf 파일 내용 좀 자세히 보여줘" - 사용하지 않음: png 이미지 → read_image_text - 사용하지 않음: 폴더 전체를 한 번에 훑고 싶을 때 → analyze_folder

NameRequiredDescriptionDefault
file_pathYes읽을 문서의 절대 경로 (pdf, docx, pptx, svg)
max_charsNo반환할 최대 문자 수(컨텍스트 보호용 절단)

Output Schema

NameRequiredDescription
pathYes
textYes
statusYesOK 또는 PARTIAL 등 처리 결과 상태
metadataYes
extensionYes
truncatedYes
next_actionsNo

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already indicate readOnlyHint, idempotentHint, and destructiveHint. The description adds valuable behavioral context: it returns the original text (possibly truncated), and explains the truncation contract (increase max_chars to retrieve the rest). This goes beyond annotations and clarifies the tool's output semantics.

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 a clear statement of purpose, usage context, return details, and examples. It is slightly lengthy but every section earns its place, and the core purpose is front-loaded. Minor redundancy with the annotation 'readOnlyHint' doesn't detract significantly.

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?

Given the output schema exists and the tool is simple, the description covers all necessary aspects: what it does, when to use it, how output is truncated, and how to recover full text. The examples reinforce correct usage. Nothing critical is missing for an agent 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 parameters are fully documented. The description reinforces the purpose of max_chars in the truncation note but doesn't add new semantic details beyond the schema. Baseline 3 is appropriate when the schema carries the full parameter documentation.

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 extracts text from document files (pdf/docx/pptx/svg) and explicitly notes it does not summarize. It differentiates from siblings by naming the specific use case (inspecting files from scan_folder/analyze_folder) and alternative tools (read_image_text, analyze_folder), making the purpose unmistakable.

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?

Provides explicit when-to-use (detailed look at a found file, or continuing a truncated analyze_folder summary) and when-not-to-use (PNG images -> read_image_text, folder-wide scanning -> analyze_folder). Also gives a concrete example of user phrasing, leaving no ambiguity about when this tool should be selected.

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

read_image_textA
Read-onlyIdempotent

PNG 이미지 하나를 OCR로 읽어 텍스트를 추출합니다(Tesseract-OCR 필요).

스크린샷, 스캔한 메모, 다이어그램에 박힌 라벨처럼 이미지 안의 문자를 읽어야 할 때 사용하세요. 순수 그림/사진처럼 텍스트가 없는 이미지는 빈 결과가 나올 수 있습니다(비전 해석이 아니라 OCR이므로 그림 자체의 의미는 파악하지 못합니다).

Returns: ReadImageTextResponse: text에 인식된 문자열이 담깁니다. 결과가 비어 있으면 next_actions에서 그 이유를 안내합니다.

Examples: - 사용: "이 스크린샷에 뭐라고 적혀 있어?" - 사용하지 않음: pdf/docx/pptx/svg 문서 → read_document

NameRequiredDescriptionDefault
file_pathYesOCR로 읽을 PNG 이미지의 절대 경로
max_charsNo반환할 최대 문자 수(컨텍스트 보호용 절단)

Output Schema

NameRequiredDescription
pathYes
textYes
statusYesOK 또는 PARTIAL 등 처리 결과 상태
metadataYes
truncatedYes
next_actionsNo

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, idempotentHint, destructiveHint), the description discloses important behavioral traits: it requires Tesseract-OCR, it is OCR not vision (so it does not understand image meaning), and it may return empty results for text-less images, with next_actions explaining why. This adds significant value over annotations.

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 and front-loaded with the core purpose, followed by usage guidelines, return details, and examples. It is slightly verbose with the examples, but each section carries useful information without redundancy.

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?

For a simple OCR tool, the description covers purpose, usage, limitations, and dependencies. The output schema is mentioned (though not shown) and the max_chars truncation is addressed. The only minor gap is that it could specify what happens on file-not-found or unsupported formats, but these are likely covered elsewhere.

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%, with both parameters clearly described (file_path as absolute path, max_chars as truncation limit). The description itself does not add further parameter detail, so per the calibration baseline of 3 for high coverage, this score is appropriate.

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 specifies the exact verb and resource: 'Reads a PNG image with OCR to extract text' and explicitly distinguishes it from read_document for document formats. It clearly states the tool's scope and what it does not do.

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 explicitly states when to use the tool ('for screenshots, scanned notes, labels on diagrams') and when not to use it ('for pdf/docx/pptx/svg documents → read_document'), providing clear exclusions and routing to alternatives.

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

scan_folderA
Read-onlyIdempotent

폴더 안의 대상 파일(pdf/docx/pptx/svg/png) 목록과 확장자별 개수를 조회합니다.

문서 내용을 읽지 않고 메타데이터(경로/크기/수정일)만 가볍게 훑어보는 도구입니다. 폴더 안에 어떤 파일이 몇 개 있는지 빠르게 확인하고 싶을 때 사용하세요.

Returns: ScanFolderResponse: files[]에 경로/이름/확장자/크기/수정일이 담깁니다. 파일이 max_files보다 많으면 list_truncated=True이고, by_extension의 개수는 상한과 무관하게 항상 전체 매칭 파일 기준입니다.

Examples: - 사용: "이 폴더에 어떤 문서들이 있어?", "pdf 몇 개야?" - 사용하지 않음: 파일 내용까지 요약하고 싶을 때 → analyze_folder - 사용하지 않음: 하위 폴더 구조/통계까지 보고 싶을 때 → analyze_folder_structure

NameRequiredDescriptionDefault
max_filesNo목록에 포함할 최대 파일 수(컨텍스트 보호용 상한). 초과분은 스킵되며 list_truncated=True로 표시됩니다(개수 통계는 항상 전체 기준).
recursiveNo하위 폴더까지 재귀적으로 탐색할지 여부
extensionsNo필터링할 확장자 목록(예: ['.pdf', '.png']). 생략하면 pdf/docx/pptx/svg/png 전체를 대상으로 함
folder_pathYes스캔할 폴더의 절대 경로

Output Schema

NameRequiredDescription
filesYes
folderYes
statusYesOK 또는 PARTIAL 등 처리 결과 상태
total_filesYes실제 반환된 파일 수 (= len(files))
by_extensionYes상한과 무관하게 전체 매칭 파일 기준 확장자별 개수
next_actionsNo
total_matchedYes조건에 맞는 전체 파일 수(상한 적용 전)
list_truncatedYestotal_matched > total_files이면 True. 목록이 잘렸다는 뜻

TDQS

A4.6/5.0
Behavior5/5

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

While annotations already declare readOnlyHint=true and idempotentHint=true, the description adds crucial behavioral context beyond this: it explicitly states that document contents are NOT read, only metadata (path/size/modified date). It also discloses truncation behavior (list_truncated flag, by_extension always full). These details inform an agent about side-effects and guarantees that annotations alone do not convey.

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-organized with a clear first sentence stating the core purpose, followed by a behavioral note, return format details, and usage examples. It is slightly verbose (multiple paragraphs) but every section earns its place, front-loading the key action and scoping. It could be tightened, but structure is strong.

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?

Given the tool's moderate complexity (4 parameters, output schema, multiple siblings), the description covers all essential aspects: what it returns (files array fields and by_extension counts), truncation edge-case behavior, and guidance on when to use alternatives. With an output schema present, the description need not detail return types, yet it already does so sufficiently. No critical information 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?

Input schema has 100% description coverage, so the baseline is 3. The description adds marginal value by reinforcing that max_files truncates the list but not the by_extension counts, which is already implied in the schema's max_files description. Since the schema documents all parameters fully, the description does not meaningfully augment parameter semantics beyond what is already structured.

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 function: it lists target files (pdf/docx/pptx/svg/png) in a folder and provides counts by extension. It explicitly distinguishes itself from siblings by stating it reads only metadata, not content, and names specific alternatives (analyze_folder, analyze_folder_structure) with conditions for their use. This makes the tool's purpose unmistakable and differentiates it from the four 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 provides explicit usage guidance: use when you want to quickly check which documents exist and how many there are, with example queries. It also gives clear exclusions: do not use for content summarization (use analyze_folder) or for subfolder structure/statistics (use analyze_folder_structure). These concrete when-to-use and when-not-to-use instructions leave no ambiguity for an agent.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.1.0
    • First observedanalyze_folder
    • First observedanalyze_folder_structure
    • First observedread_document
    • First observedread_image_text
    • First observedscan_folder

TDQS

A4.5/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: read_document handles individual text documents, scan_folder lists metadata, analyze_folder_structure provides hierarchical stats, read_image_text does OCR, and analyze_folder batch-processes all files. Descriptions explicitly state what not to use each tool for, reinforcing boundaries.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern (read_document, scan_folder, analyze_folder_structure, read_image_text, analyze_folder). The verbs are distinct and descriptive, and the pattern is uniform across the set.

Tool Count5/5

With 5 tools, the server is well-scoped for file and folder analysis. Each tool covers a distinct aspect (single read, metadata scan, structure analysis, OCR, batch processing) without redundancy or missing essentials, making the count ideal for its purpose.

Completeness5/5

The tool surface covers the full lifecycle of file analysis: listing, detailed reading (both text and OCR), structural analysis, and batch processing. Error handling and truncation are addressed. No obvious gaps for the stated domain, such as missing file deletion or modification, which are out of scope.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Provides LLMs with secure, read-only access to local documentation by scanning directories, extracting content from PDF, DOCX, Markdown, and text files, and performing keyword searches.
    3
    3 npm
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables read-only analysis of local unstructured documents by scanning a folder, extracting text and structural metadata, and passing content with truncation and error-awareness to an LLM for summarization.
    9
    1
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables local, read-only extraction of text and structure from PDF, DOCX, PPTX, SVG, and PNG files, including OCR for images, directory tree and metadata reporting, with strict path isolation and audit logging.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables local folder analysis of unstructured documents (PDF, DOCX, PPTX, TXT, SVG, PNG, CSV, XLSX) by extracting structure, reading content, and generating reports, with a strict approval gate before any save operation.
    -