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)Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | — | Filter to a specific directory |
summary | boolean | true | Compact view with counts only; set false for full symbol listing |
Output (summary mode)
Section titled “Output (summary mode)”src/ api/ (3 files, 12 functions) services/ (5 files, 31 functions) models/ (4 files, 8 classes) middleware/ (2 files, 6 functions)Output (full mode)
Section titled “Output (full mode)”src/services/auth.ts class AuthService login :14 logout :38 refreshToken :57 validate :82When to use
Section titled “When to use”- 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