find_all_pattern
Search and analyze JavaScript/TypeScript code by finding all nodes matching a specific pattern. Use for audits, debugging, or understanding codebase behavior, such as locating functions, TODOs, API calls, or error messages.
Instructions
Find all nodes matching the specified pattern. Use for comprehensive analysis when you need all matches.
Examples: • Audit all functions: find_all_pattern('function') • Find all TODO comments: find_all_pattern('comment[text*="TODO"]') • Security audit: find_all_pattern('call[text*="eval"]') • Performance review: find_all_pattern('call[text*="console.log"]') to find debug logs • API usage: find_all_pattern('call[text*="fetch"]') to find all API calls • React hooks: find_all_pattern('call[text*="use"]') for hooks usage • Error patterns: find_all_pattern('string[text*="error"]') for error messages • Database queries: find_all_pattern('string[text*="SELECT"]') for SQL • Event handlers: find_all_pattern('function[text*="onClick"]')
Input Schema
Name | Required | Description | Default |
---|---|---|---|
limit | No | Maximum number of matches to return (default: no limit). Use for large codebases. | |
pattern | Yes | Pattern to match: 'function', 'call[text*="console.log"]', 'string[text*="TODO"]' |