Skip to main content
Glama

locate

Read-onlyIdempotent

Find a symbol's file and line in an enrolled repo via live AST parsing. Verify a definition exists before claiming it, avoiding grep's misses and false hits.

Instructions

Deterministically locate symbols in an enrolled repo: name → file:line (+ short body hash). Pass symbol to find a specific definition without grepping (a named lookup searches every kind); omit it to list all (capped, paginate with offset) — the unfiltered list defaults to functions+classes. Use this to verify a symbol exists before claiming it does: a zero-match result is definitive (parsed from the live AST), unlike grep, which can miss real symbols (formatting/whitespace variance, multi-line signatures) or hit false positives (comments, strings).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNorestrict to func|class|export|import (default: func+class)
repoYesname of an enrolled repo
offsetNoskip this many matches before returning a page (default 0). Page again with the response's next_offset until it's absent.
symbolNosymbol to locate: matches by exact name, name prefix, or last dotted segment (e.g. "fetch" finds "Reader.fetch"). Omit to list all (capped).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and closed-world, so safety is covered. The description still adds real behavioral context beyond them: determinism from the live AST, that a zero-match result is definitive, that unfiltered results are capped and paginated, and that the default kind set is func+class. It stops short of detailing result size or latency, but that is a minor gap.

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

Conciseness4/5

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

Front-loaded: the core operation (name → file:line) comes first, then parameter behavior, then the verification rationale. It is dense but nearly every clause carries information; the grep contrast runs slightly long, keeping it just under a 5.

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

Completeness5/5

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

With no output schema, the description carries the return-value burden and does so: it specifies the file:line plus short body hash output and the next_offset pagination contract. For a read-only, four-parameter lookup tool, nothing needed to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning beyond the schema: a named lookup ignores the kind narrowing and searches every kind, and the unfiltered list defaults to functions+classes. It also reinforces the capped/paginated behavior of `offset`, which is genuinely useful for interpreting results.

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

Purpose5/5

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

States a precise verb+resource: deterministically locate symbols in an enrolled repo, returning name → file:line plus a body hash. It distinguishes itself from grep explicitly and from siblings like hash/structure/diff by emphasizing deterministic AST-parsed lookup. An agent can identify exactly what this tool produces without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit conditional usage: pass `symbol` for a named lookup that searches every kind, omit it to list all with pagination. It also states the purpose-level trigger (verify a symbol exists before claiming it does) and contrasts with the grep alternative, which is exactly the routing guidance an agent needs.

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

Deploy Server

Other Tools