Skip to main content
Glama
mcp-document-intelligence

mcp-document-intelligence

scan_directory

Scan a directory to inventory supported documents with filenames, paths, sizes, and optional OCR text previews; use list-only mode for filename-only results or recursive pagination.

Instructions

Scan a directory for documents. Returns filename, path, size, and optionally a text preview (OCR-enabled). Use listOnly=true for fast directory listing without text extraction. Supports PDF, DOCX, DOC, Pages, images, TXT, RTF, ODT.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "scan_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path to directory
limitNoMax files to return (default: 50). Use 0 for no limit.
offsetNoSkip the first N files (for pagination, default: 0)
listOnlyNoIf true, return only filenames/paths/sizes without text extraction (much faster for large directories, default: false)
recursiveNoScan subdirectories (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.6.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add real behavioral context: it names the return fields, discloses that text extraction is OCR-enabled and therefore slower, and offers listOnly as a fast path. It stops short of covering error behavior for unreadable paths, whether extraction can fail per-file, or any permission requirements.

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?

Four short sentences, front-loaded with the purpose and return shape, then the fast-path hint and format support. Minor redundancy between 'optionally a text preview' and 'listOnly=true ... without text extraction', but nothing is padded.

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?

With no output schema and no annotations, the description correctly compensates by listing the returned fields and the cost tradeoff, and the schema covers all five parameters with defaults. Missing details are modest: failure modes on inaccessible directories and whether OCR requires external dependencies.

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 coverage is 100%, so limit, offset, recursive, and listOnly are already documented with defaults. The description reinforces listOnly's tradeoff and adds the supported format list (PDF, DOCX, DOC, Pages, images, TXT, RTF, ODT), which is meaningful context but not parameter semantics the schema lacks.

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?

States a specific verb and resource (scan a directory for documents) and enumerates what comes back (filename, path, size, optional text preview). It does not distinguish itself from siblings like analyze_folder or analyze_document, which also operate on folders/documents, so an agent cannot fully route on this text alone.

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

Usage Guidelines3/5

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

The only usage steering is parameter-level: 'Use listOnly=true for fast directory listing without text extraction.' That is good guidance for choosing a mode but says nothing about when to pick this tool over analyze_folder or analyze_document, and no exclusions or prerequisites are stated.

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