Skip to main content
Glama

locate

Locate symbols in a repository by name, returning file, line, and body hash. Verify symbol existence with zero-match results, avoiding grep pitfalls like formatting variance and false positives.

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).
Behavior5/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It reveals deterministic parsing from the live AST, zero-match definitiveness, capped results, pagination via offset, and default filtering to functions+classes. These details far exceed minimal expectations.

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

Conciseness5/5

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

Three dense sentences pack the core purpose, usage, and rationale without redundancy. The description is front-loaded with the primary action and organizes supporting details logically, earning its length.

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?

Given no output schema, the description defines the return format (file:line + body hash), covers cap and pagination behavior, and explains the zero-match result as definitive. Combined with the rich schema, the tool is fully comprehensible without further context.

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 description coverage is 100%, so a baseline of 3 is appropriate. However, the description adds a key behavioral nuance not in the schema: a named symbol lookup searches every kind. This supplemental meaning justifies a 4.

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?

The description uses a specific verb ('locate') and resource ('symbols in an enrolled repo') with an explicit output mapping (name → file:line + body hash). It clearly distinguishes itself from sibling tools like structure, diff, and hash by focusing on deterministic definition lookup.

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

Usage Guidelines4/5

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

The description explicitly states when to use the tool ('verify a symbol exists before claiming it does') and contrasts it with grep, explaining why grep is unreliable. However, it does not explicitly name sibling tools or provide when-not-to-use exclusions, so it falls short of a 5.

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/inth3shadows/runecho'

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