localnest_find_usages
Locate call sites and import usages of symbols in your codebase by name to understand dependencies and track references.
Instructions
Find call sites and import usages of a symbol by name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| project_path | No | ||
| all_roots | No | ||
| glob | No | * | |
| max_results | No | ||
| case_sensitive | No | ||
| context_lines | No | ||
| response_format | No | json |
Implementation Reference
- src/mcp/tools/retrieval.js:393-426 (handler)Registration and handler implementation for the `localnest_find_usages` MCP tool. It calls `search.findUsages` and normalizes the output.
registerJsonTool( 'localnest_find_usages', { title: 'Find Usages', description: 'Find call sites and import usages of a symbol by name.', inputSchema: { symbol: z.string().min(1), project_path: z.string().optional(), all_roots: z.boolean().default(false), glob: z.string().default('*'), max_results: z.number().int().min(1).max(1000).default(defaultMaxResults), case_sensitive: z.boolean().default(false), context_lines: z.number().int().min(0).max(10).default(0) }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } }, async ({ symbol, project_path, all_roots, glob, max_results, case_sensitive, context_lines }) => normalizeUsageResult( search.findUsages({ symbol, projectPath: project_path, allRoots: all_roots, glob, maxResults: max_results, caseSensitive: case_sensitive, contextLines: context_lines }), symbol ) );