Skip to main content
Glama
Smart File Reader MCP Server

Smart File Reader MCP Server

list_files

Lists files and subdirectories in a directory, including names, sizes, and types, so AI assistants can inspect local folder contents and choose files to read or analyze.

Instructions

List files and subdirectories in a directory with names, sizes, and types.

    Args:
        directory: Directory path to list (defaults to current root directory).
    

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
directoryNo.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it leaves key traits unstated: whether listing is recursive or top-level only, how hidden files or permission errors are handled, and whether output is sorted or truncated. The mention of returned fields (names, sizes, types) is useful but partly redundant with the output schema.

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 core sentence is front-loaded and free of padding. The Google-style "Args:" block is slightly ceremonial for one parameter but not wasteful.

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

Completeness3/5

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

The tool is simple and the existence of an output schema removes the need to explain return values. However, with no annotations and no mention of recursion behavior or error handling, the definition is only minimally sufficient for calling the tool 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 coverage is 0%, and the schema only gives a "Directory" title and a "." default. The description adds that the parameter is a directory path and that it defaults to the current root directory, which is modest but real added meaning for a single-parameter tool.

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 gives a specific verb and resource ("List files and subdirectories in a directory") and even names the fields returned (names, sizes, types). It does not distinguish itself from siblings like search_files or get_directory_tree, so it falls short of a 5.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus search_files, get_directory_tree, or find_large_files, and no prerequisites or exclusions are given. Usage is only inferable from the name and the word "list".

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