Skip to main content
Glama

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
NameRequiredDescriptionDefault
symbolYes
project_pathNo
all_rootsNo
globNo*
max_resultsNo
case_sensitiveNo
context_linesNo
response_formatNojson

Implementation Reference

  • 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
      )
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wmt-mobile/localnest'

If you have feedback or need assistance with the MCP directory API, please join our Discord server