functions
List every function, method, getter, setter, and arrow in a file with signatures and line numbers to locate code quickly.
Instructions
Every addressable function in a file — nested functions, class methods, getters/setters, class-field arrows, namespace members, object-literal methods/properties, default-export functions — with reconstructed signatures. NOT listed: anonymous callbacks passed as arguments (they have no name to navigate to), TS overload signature declarations (only implementations), Python lambdas. Returns JSON {path, language, hasErrors, functions[{name, signature, params[{name,type}], returnType, line, endLine, async, exported, kind, parent}]}. kind is function|method|arrow|getter|setter; parent is the enclosing scope, dotted for nesting (e.g. 'Widget.render'), null at top level; default exports are named 'default'. hasErrors:true = syntax errors, items may be missing. Caps at 500 entries (truncated.functions = true total). Languages: TS/TSX/JS/JSX/Python. Use it to pick the right line range to Read, or to survey an API surface. codelens is a navigation map: use it to LOCATE code, then Read the actual source before judging or modifying it. A signature is not the body.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path. Relative paths resolve against the server's working directory; absolute paths are allowed only inside it (anything outside is rejected — call info to see the root). Supported: .ts .tsx .mts .cts .js .jsx .mjs .cjs .py. Accepts a single path or an array of up to 20 paths; an array returns {results, summary} with per-file entries. |