Find Functions
repolens_find_functionsFind function and method definitions across JavaScript, TypeScript, and PHP repositories using AST analysis. Supports wildcard patterns, exported-only filtering, and direct directory paths.
Instructions
Find function and method definitions across repositories using AST analysis.
Searches for function declarations, arrow functions, and class methods in JS/TS and PHP. Uses ast-grep for accurate structural matching.
Args:
name (string, optional): Function name pattern. Supports wildcards: "handle*", "*Controller", "user"
paths (string, optional): Ad-hoc directory paths to search (comma-separated). No registration needed.
repoFilter (string, optional): Filter registered repositories by alias (comma-separated)
language (string, optional): Filter by language: "typescript", "javascript", "php"
exportedOnly (boolean, optional): Only return exported functions (default: false)
maxResults (number, optional): Maximum results to return (default: 100)
response_format (string, optional): Output format - "markdown" (default) or "json"
Examples:
Search a directory directly: paths="/home/user/projects/api"
Find all handlers: name="handle*"
Find exported functions in backend: repoFilter="backend", exportedOnly=true
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Function name pattern (supports wildcards like 'handle*') | |
| paths | No | Ad-hoc directory paths to search (comma-separated). No registration needed. | |
| language | No | Filter by language (typescript, javascript, php, ts, js) | |
| maxResults | No | Maximum results (default: 100, max: 500) | |
| repoFilter | No | Filter registered repositories by alias (comma-separated) | |
| exportedOnly | No | Only return exported symbols (default: false) | |
| response_format | No | Output format: "markdown" (default) or "json" |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of results returned | |
| results | Yes | Array of symbol results |