get_functions
Extract all JavaScript/TypeScript functions with metadata like name, type, location, and async status. Use for code reviews, API analysis, test coverage, refactoring prep, or performance audits by filtering anonymous or async functions.
Instructions
Get all functions with metadata including name, type, location, and async status. Includes class methods, arrow functions, and declarations.
Examples: • Code review: get_functions() to see all functions in a file • Find async operations: get_functions({asyncOnly: true}) • API analysis: get_functions() then look for functions with 'fetch' or 'api' in names • Test coverage: get_functions() to identify functions needing tests • Refactoring prep: get_functions({includeAnonymous: false}) to focus on named functions • Performance audit: get_functions() to find large/complex functions by line count
Input Schema
Name | Required | Description | Default |
---|---|---|---|
asyncOnly | No | Only return async functions (default: false). Use for async/await pattern analysis. | |
includeAnonymous | No | Include anonymous functions (default: true). Set false to focus on named functions only. |