Skip to main content
Glama

List TypeScript/JavaScript project files

ast_list_files
Read-onlyIdempotent

Lists source files included by a project's tsconfig in deterministic, project-relative, paginated form, with optional substring filtering to locate relevant code paths quickly.

Instructions

Lists source files included by the project's tsconfig in deterministic, project-relative, paginated form.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results to return (1-500).
offsetNoZero-based result offset.
glob_filterNoOptional case-insensitive substring used to filter project-relative paths.
project_rootYesAbsolute project directory containing tsconfig.json, or the config path.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYes
limitYes
totalYes
offsetYes
has_moreYes
next_offsetYes
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true, so the safety profile is fully covered. The description adds meaningful behavioral context: results are deterministic (stable ordering), project-relative (path format), and paginated (offset/limit support). This adds value beyond the annotations without contradicting them.

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, dense sentence that packs all essential information: what it lists, scope (tsconfig-included), qualities (deterministic, paginated), and format (project-relative). Zero wasted words, all meaning-bearing.

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?

The tool has an output schema and 100% parameter coverage, so the description needn't elaborate on return format. For a fairly simple file-listing tool, the description suffices. It could note whether the result includes hidden/JSON/config files or how glob_filter interacts with pagination, but for the complexity level, it's complete enough.

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% — all 4 parameters (limit, offset, glob_filter, project_root) have descriptions in the schema itself. The description mentions 'paginated' which aligns with limit/offset and 'project-relative' which aligns with glob_filter, but doesn't add meaning beyond what the schema already documents. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb (lists) with a clear resource (source files included by project's tsconfig) and adds distinctive modifiers: deterministic, project-relative, paginated. It clearly distinguishes from siblings like ast_search_symbols and ast_get_outline which operate on symbols and outlines respectively, whereas this lists raw files.

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

Usage Guidelines4/5

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

The description implies this is the entry-point tool for traversing the project's file set, distinct from sibling tools that operate on symbols/outlines/source. However, it doesn't explicitly state when NOT to use it or name specific alternative tools. The 'deterministic, project-relative, paginated' framing gives clear context, but no explicit exclusions or alternatives beyond what's implicit.

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/yailPeralta/ast-mcp-server'

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