Skip to main content
Glama
Search Code MCP

Search Code MCP

by joutvhu

list_files

List files in a directory using glob patterns or file type filters without scanning file contents. Quickly find files matching specific criteria for code search or project navigation.

Instructions

Quickly list files matching glob patterns or file types without scanning contents.

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 files in. Accepts relative or absolute paths (default: '.').
fileTypeNoFile type filter
noIgnoreNoWhether to list gitignored files
filePatternNoGlob pattern to filter files
includeHiddenNoInclude hidden files and directories
excludePatternNoGlob pattern to exclude

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.2
    • changedInput schema / properties / path / description
      Previous value: -"Directory to list files in (default: '.')"New value: +"Directory to list files in. Accepts relative or absolute paths (default: '.')"
  2. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the performance trait ('quickly', 'without scanning contents') but says nothing about traversal depth (recursive or not), how gitignore/hidden defaults interact with results, ordering, or result shape — key unknowns for a 6-parameter listing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with no filler; the core action leads and the constraint follows. It is efficient, though it is arguably too terse to fully exploit the space available.

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 no annotations and no output schema, the description must carry behavior on its own. It conveys purpose and a performance promise but omits traversal semantics, ignore/hidden defaults, and output structure, which is minimal-but-adequate rather than complete for a 6-param tool.

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 the baseline is 3. The description references glob patterns and file types, loosely echoing filePattern/fileType, but adds no syntax, format, or interaction detail beyond what the schema already documents.

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 names a specific verb and resource ('list files') and scopes it with the filter mechanism ('matching glob patterns or file types'). The qualifier 'without scanning contents' implicitly separates it from content-oriented siblings like search, but no sibling is named explicitly, so it falls short of the top score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Quickly' and 'without scanning contents' imply this is the lightweight metadata-only path versus a content-searching sibling, giving implied usage guidance. However, it never states when to prefer this over dump_tree, search, or count, nor any prerequisites or exclusions.

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

Deploy Server

Other Tools