Skip to main content
Glama

List files

list_files
Read-onlyIdempotent

Lists files and directories in a workspace with type and size, with optional path, glob pattern, recursion, hidden-file inclusion, and entry limits.

Instructions

List files and directories in the workspace with their type and size.

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
pathNoDirectory to list, relative to the root..
patternNoGlob matched against entry names, e.g. '*.py'.*
recursiveNoDescend into subdirectories.
max_entriesNo
include_hiddenNoInclude dotfiles and dot-directories such as .git.

Output Schema

NameRequiredDescriptionDefault
entriesYes
directoryYes
truncatedYesTrue if more entries matched than were returned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and a closed (non-open-world) scope, so the safety profile is covered. The description adds that entries come back with type and size, which is genuinely beyond the annotations, but it says nothing about truncation at max_entries or how deep recursion behaves.

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 front-loaded sentence with no filler; the resource and the return payload are stated immediately and nothing is repeated from the schema or annotations.

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?

An output schema exists, so return format need not be described, and the five parameters are 80% documented in-schema. What is still missing is any statement of relationship to search_files and any note on result limits, which matters at max_entries=200 default.

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 80%, so path, pattern, recursive and include_hidden are already documented; max_entries is the one bare parameter. The description adds no syntax or semantics on top of the schema, so the baseline 3 applies.

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+resource (list files and directories) plus the scope (in the workspace) and what is returned (type and size). It does not differentiate from the sibling search_files, which is the one thing an agent could confuse it with.

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 when-to-use guidance at all: nothing says whether to prefer this over search_files, or when recursion/pattern filtering makes search the better call. Usage must be inferred entirely from the name.

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