Skip to content

code_structure

code_structure returns a hierarchical view of the project: directories, files, classes, and the functions they contain. Use it for a quick architectural overview without reading any code.

code_structure()
code_structure(path="src/api", summary=false)
ParameterTypeDefaultDescription
pathstringFilter to a specific directory
summarybooleantrueCompact view with counts only; set false for full symbol listing
src/
api/ (3 files, 12 functions)
services/ (5 files, 31 functions)
models/ (4 files, 8 classes)
middleware/ (2 files, 6 functions)
src/services/auth.ts
class AuthService
login :14
logout :38
refreshToken :57
validate :82
  • Onboarding to an unfamiliar project — understand its shape before diving in
  • Confirm a module exists before referencing it
  • Get a bird’s-eye view of where logic is organized