Skip to main content
Glama

list_files

Read-onlyIdempotent

List indexed project files, optionally filtered by a glob pattern, to quickly locate relevant codebase files without manual searching.

Instructions

List indexed files, optionally filtered by glob.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoAlias de `pattern`. Glob pattern to filter files (uses fnmatch).
queryNoAlias de `pattern`. Glob pattern to filter files (uses fnmatch).
patternNoGlob pattern to filter files (uses fnmatch).
projectNoProject name/path (default: active).
max_resultsNoMaximum number of results to return (0 = unlimited, default 0).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.20.0
    • addedInput schema / properties / glob
      Added value: +{
      +  "description": "Alias de `pattern`. Glob pattern to filter files (uses fnmatch).",
      +  "type": "string"
      +}
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Alias de `pattern`. Glob pattern to filter files (uses fnmatch).",
      +  "type": "string"
      +}
  2. Addedv4.0.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The word "indexed" adds a small but real signal that results come from a built index rather than the live filesystem (and may be stale), but no ordering, staleness, or pagination behavior is disclosed.

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 optional filter are stated immediately. Nothing is wasted.

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 full annotation coverage, a fully documented schema, and no output schema, the bar is lower, but a listing tool still benefits from noting result ordering, staleness relative to reindex, and how it relates to the search tools. Those gaps leave it merely adequate.

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 100%, so the schema documentation carries the parameter burden and the 3-baseline applies. The description adds nothing beyond the schema — notably it does not clarify that glob/query/pattern are three aliases of the same filter, which is the most confusing aspect of this 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?

States a specific verb and resource ("List indexed files") plus the optional filter dimension. However it does not distinguish this tool from siblings like search_codebase, get_feature_files, or read_lines, which an agent could plausibly pick for similar file-discovery needs.

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?

No when-to-use or when-not-to-use guidance. With ~40 siblings including several file/symbol search tools, the description never says why to choose list_files over search_codebase or find_symbol, nor that it enumerates everything rather than matching content.

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