Skip to main content
Glama

locate

Finds where to start on a coding task: pass code names and domain terms in one call to get a short ranked list of matching files with reasons, without reading files.

Instructions

Where to start with a task: give the names and domain terms from the task in ONE call; answers from the project map (no file reading) with a short ranked list of files (top 5; all: true = every match), each with its reasons: exact definition, file name, name part, string literal, call, callers: N. Example: {"terms": ["RefundController", "processRefund", "refund", "payment_status", "checkout.vue"]}. Pitfall: pass code names, not a sentence; translate non-English domain words to their English code names (visszatérítés → refund); one call with all terms, not one call per term. For exact text (log message, config value) use Grep.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "terms": "<terms>"
    },
    "name": "locate"
  }
}

Input Schema

NameRequiredDescriptionDefault
allNoEvery matching file instead of the top 5.
termsYesNames and domain terms from the task, in code form: function / class / file names, columns, routes, and the English code name of a non-English domain word (`["RefundController", "processRefund", "refund", "payment_status", "checkout.vue"]`); a single string works too. An element with spaces is one phrase, matched as a whole against string literals (a UI label); `route::events.show` finds a route's definition and its `route()` calls; `--orange-500` a CSS custom property.
projectNoRegistered project alias; default: the server's working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.3

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that results come from the project map with no file reading, the default top-5 cap versus `all: true`, and the ranked reasons taxonomy including `callers: N`. It does not cover permissions, latency, or error behavior, but for a read-only lookup the substantive traits are present.

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 with the purpose and output shape, then an example, then pitfalls, then the alternative tool — a logical flow with little waste. It is dense to the point of cramming several distinct ideas into one block, which slightly hurts scanability.

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

Completeness4/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 must explain the return value and does: a short ranked file list capped at 5, each annotated with match reasons. Combined with fully documented parameters, an agent has enough to call it correctly, though the exact scoring/rank derivation is only sketched.

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; the description adds real value beyond it by spelling out the batching rule (one call with all terms, not one per term) and the translate-to-English-code-names pitfall. Its inline example also clarifies the shape of `terms` beyond the schema's own example.

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 specific verb and resource with scope: given names and domain terms, it returns a ranked list of files from the project map, top 5 by default. It also distinguishes itself from the sibling Grep by reserving exact-text lookups for that tool, so an agent can choose correctly without opening either 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?

Explicitly positions itself as the starting point for a task, tells the agent to batch all terms into one call, and names the alternative for literal text searches (Grep). It goes further with actionable exclusions: don't pass a sentence, and translate non-English domain words to their English code names with a concrete example.

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