Skip to main content
Glama

List files

list_files
Read-only

List files under any Linux path with sortable output by size, name, or modified time. Use this to inspect directory contents and prioritize large or recently changed files.

Instructions

List files under a specified path with various sorting options.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodesYes
totalNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed13 schema fields changedv1.6.0
    • removedInput schema / $defs
      Removed value: -{
      -  "OrderBy": {
      -    "enum": [
      -      "size",
      -      "name",
      -      "modified"
      -    ],
      -    "type": "string"
      -  },
      -  "SortBy": {
      -    "enum": [
      -      "ascending",
      -      "descending"
      -    ],
      -    "type": "string"
      -  }
      -}
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / order_by / $ref
      Removed value: -"#/$defs/OrderBy"
    • addedInput schema / properties / order_by / enum
      Added value: +[
      +  "size",
      +  "name",
      +  "modified"
      +]
    • addedInput schema / properties / order_by / type
      Added value: +"string"
    • removedInput schema / properties / sort / $ref
      Removed value: -"#/$defs/SortBy"
    • addedInput schema / properties / sort / enum
      Added value: +[
      +  "ascending",
      +  "descending"
      +]
    • addedInput schema / properties / sort / type
      Added value: +"string"
    • removedOutput schema / $defs
      Removed value: -{
      -  "NodeEntry": {
      -    "description": "A node entry model that is used by both directories and files listing.",
      -    "properties": {
      -      "human_modified": {
      -        "default": "1970-01-01T00:00:00",
      -        "format": "date-time",
      -        "type": "string"
      -      },
      -      "human_size": {
      -        "default": "",
      -        "type": "string"
      -      },
      -      "modified": {
      -        "default": 0,
      -        "type": "number"
      -      },
      -      "name": {
      -        "default": "",
      -        "type": "string"
      -      },
      -      "size": {
      -        "default": 0,
      -        "type": "integer"
      -      }
      -    },
      -    "type": "object"
      -  }
      -}
    • removedOutput schema / properties / nodes / items / $ref
      Removed value: -"#/$defs/NodeEntry"
    • addedOutput schema / properties / nodes / items / description
      Added value: +"A node entry model that is used by both directories and files listing."
    • addedOutput schema / properties / nodes / items / properties
      Added value: +{
      +  "human_modified": {
      +    "default": "1970-01-01T00:00:00",
      +    "format": "date-time",
      +    "type": "string"
      +  },
      +  "human_size": {
      +    "default": "",
      +    "type": "string"
      +  },
      +  "modified": {
      +    "default": 0,
      +    "type": "number"
      +  },
      +  "name": {
      +    "default": "",
      +    "type": "string"
      +  },
      +  "size": {
      +    "default": 0,
      +    "type": "integer"
      +  }
      +}
    • addedOutput schema / properties / nodes / items / type
      Added value: +"object"
  2. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

The readOnlyHint annotation already covers the safety profile, and the description adds path-scoped listing plus sorting behavior as useful context. However, it does not disclose whether the listing is recursive, whether hidden files are included, or that the tool can operate on a remote host via the host parameter.

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?

A single ten-word sentence states the verb, resource, scope, and capability with zero filler. The information is front-loaded and every word earns its place.

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?

With a 100%-covered schema, an output schema, and a readOnlyHint annotation, the structured data carries much of the burden, so the description need not explain return values or parameter formats. The remaining gaps are the lack of differentiation from list_directories and unspecified listing behavior (recursion, hidden files), which prevent the description from being fully complete for an agent deciding which tool to call.

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 every parameter is already documented in the input schema and the description adds no new parameter semantics. The mention of 'sorting options' merely restates the order_by and sort parameters, keeping this at the baseline of 3.

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 uses a specific verb ('List') with a clear resource ('files under a specified path') and notes sorting options, so an agent immediately understands the core operation. It does not explicitly distinguish itself from the sibling list_directories, leaving some ambiguity about whether directories are also included in results.

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 such as list_directories or read_file. No conditions, exclusions, or prerequisites are stated, so the agent must infer the appropriate context from the tool name alone.

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

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