Skip to content

list_files

Use list_files before editing when you need the current project tree or a path prefix

read-only · idempotent

NameTypeRequiredDefaultDescription
project_nameAnnotated[str, Field(description='Name of the Bridge Town project.')]Yes
pathAnnotated[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[strNone, Field(description=“Branch to operate on. Defaults to the project’s default branch when omitted or null.”)]`NoNone
max_resultsAnnotated[int, Field(description='Maximum number of files to return. Defaults to 1000. Results are truncated when the total exceeds this.')]No100
patternAnnotated[str, Field(description="Optional glob pattern to filter filenames (e.g. '*.py', 'model/**/*.py'). Applied after path filtering.")]No''

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.

{
"name": "list_files",
"arguments": {
"project_name": "forecasts",
"path": "model",
"pattern": "*.py",
"max_results": 50
}
}
{
"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.