Skip to main content
Glama

List files

list_files
Read-only

Lists files in a specified directory path with sorting by size, name, or modification date. Use this tool to organize and analyze file structures on Linux systems.

Instructions

List files under a specified path with various sorting options.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the directory to analyze
order_byNoSort order - 'size', 'name', or 'modified' (default: 'name')name
sortNoSort direction - 'ascending' or 'descending' (default: 'ascending')ascending
top_nNoOptional limit on number of files to return (1-1000, only used with size ordering)
hostNoRemote host to connect to via SSH

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodesYes
totalNo
Behavior3/5

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

The annotation 'readOnlyHint: true' already indicates this is a safe read operation. The description adds minimal behavioral context beyond this, mentioning sorting options but not covering aspects like pagination, error handling, or performance implications. It doesn't contradict annotations, but adds limited value.

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 a single, efficient sentence that states the core functionality without unnecessary words. It's appropriately sized and front-loaded with the essential information, making it easy for an agent to parse quickly.

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?

Given the presence of both annotations (readOnlyHint) and an output schema, the description provides adequate context for this read-only listing tool. The description covers the basic purpose and scope, though it could benefit from more guidance on usage relative to sibling tools.

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?

With 100% schema description coverage, the input schema fully documents all 5 parameters. The description mentions 'various sorting options' which aligns with the schema's 'order_by' and 'sort' parameters, but adds no additional semantic meaning beyond what's already in the structured schema.

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 the verb ('List') and resource ('files'), and specifies the scope ('under a specified path with various sorting options'). However, it doesn't explicitly differentiate from sibling tools like 'list_directories' or 'list_services', which reduces the score from a perfect 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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when this tool is appropriate compared to siblings like 'list_directories' or 'list_services', nor does it specify any prerequisites or exclusions for usage.

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/rhel-lightspeed/linux-mcp-server'

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