Skip to main content
Glama

list_files

List files under a specified path to review directory contents and locate target files, simplifying data exploration before loading.

Instructions

List files under path (file, directory, or glob).

    Useful when you don't know what's in a directory and need to find a
    specific file before calling load_source. For HDF5/array directories,
    prefer detect_pattern() which also classifies the multi-file structure.
    Output size: small (file list capped at max_files).
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
max_filesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the full burden. It adds useful behavioral details: accepts file/directory/glob, output size is small, and results are capped at max_files. It doesn't mention error handling or permissions, but the disclosed traits are valuable for an agent.

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 compact and front-loaded. The first sentence states the core action, and the remaining sentences add usage guidance, an alternative, and output size—all without redundancy. Every sentence earns its place.

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?

For a simple file-listing tool with an output schema, the description covers purpose, usage, alternatives, and output characteristics. It is sufficiently complete given the tool's low complexity and the presence of an output schema.

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

Parameters4/5

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

Schema has no parameter descriptions (coverage 0%), so the description must compensate. It adds meaning to `path` by noting it can be a file, directory, or glob, and to `max_files` by stating it caps the file list. This goes beyond the raw schema, though it leaves some details (like default behavior) to the schema.

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: 'List files under `path` (file, directory, or glob).' It distinguishes itself from siblings by mentioning use before load_source and contrasting with detect_pattern(), making its 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 guidance: 'Useful when you don't know what's in a directory and need to find a specific file before calling load_source' and directs users to 'prefer detect_pattern()' for HDF5/array directories. This covers both when to use and when not to use the tool.

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/charliecpeterson/edamcp'

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