Skip to main content
Glama

Find Usages

localnest_find_usages
Read-onlyIdempotent

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaNo

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
      )
    );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the operation as readOnlyHint=true and idempotentHint=true, so the safety profile is covered. The description adds no behavioral context beyond the basic function (e.g., whether it searches across all files by default, performance characteristics, or that it requires a pre-built index), but does not contradict the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The single sentence is efficient and front-loaded, but its extreme brevity is inappropriate for a tool with 8 parameters and zero schema documentation. The conciseness crosses into under-specification given the complexity of the input schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema (which excuses the description from detailing return values), the description is inadequate for an 8-parameter tool with no parameter descriptions. It misses critical context like indexing requirements, the relationship between 'project_path' and 'all_roots', or that 'context_lines' controls snippet size.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fails to compensate for the undocumented parameters. While 'by name' hints at the required 'symbol' parameter, it offers no guidance on the other 7 parameters (project_path, all_roots, glob, max_results, case_sensitive, context_lines, response_format), leaving agents without semantic context for filtering and formatting options.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('find') and resources ('call sites and import usages') that clearly define the tool's scope. It implicitly distinguishes from sibling 'localnest_get_symbol' (which likely retrieves definitions) by focusing on usages, though explicit differentiation from 'localnest_search_code' is absent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'localnest_search_code' or 'localnest_search_hybrid'. Critical prerequisites (such as requiring the project to be indexed via 'localnest_index_project' first) are not mentioned, leaving agents to infer dependencies from sibling tool names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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