list_files
Use list_files before editing when you need the current project tree or a path prefix
read-only · idempotent
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | Annotated[str, Field(description='Name of the Bridge Town project.')] | Yes | — | |
path | Annotated[str, Field(description="Optional subtree path to list within (e.g. 'model/' to list only model files). Omit to list all files.")] | No | '' | |
branch | `Annotated[str | None, Field(description=“Branch to operate on. Defaults to the project’s default branch when omitted or null.”)]` | No | None |
max_results | Annotated[int, Field(description='Maximum number of files to return. Defaults to 1000. Results are truncated when the total exceeds this.')] | No | 100 | |
pattern | Annotated[str, Field(description="Optional glob pattern to filter filenames (e.g. '*.py', 'model/**/*.py'). Applied after path filtering.")] | No | '' |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
project(string)path(string)branch(null)files(array<object>)count(integer)total_count(integer)truncated(boolean)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "list_files", "arguments": { "project_name": "forecasts", "path": "model", "pattern": "*.py", "max_results": 50 }}Response
Section titled “Response”{ "project": "forecasts", "path": "model", "branch": null, "files": [ { "name": "revenue.py", "path": "model/revenue.py", "size": 482, "type": "file" }, { "name": "headcount.py", "path": "model/headcount.py", "size": 612, "type": "file" } ], "count": 2, "total_count": 2, "truncated": false}- Module:
Models - Requires authentication via API token or Auth0 JWT.