Skip to main content
Glama

semantic_locate

Read-onlyIdempotent

Find code by describing what it does in plain language, ranked from a graph, when you don't know the exact name.

Instructions

Find code by a plain-language question, ranked from the graph. Call it when you know what the code does but not its name. Returns id, name, kind, file, line, signature, score. Read ranked_by. Know the exact name? Use semantic_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax ranked rows per page: entities, or files at file granularity. Default 20.
queryNoNatural-language description of the code to find. Optional when paging with `cursor`.
cursorNoOpaque token from a prior result's `next_cursor`. Pass it back unedited.
max_charsNoSerialized characters this response may occupy; what was cut is named in `elisions`.
granularityNoRank entities ('entity', default) or roll up to files ('file')entity
include_testsNoRank test-role entities alongside source. Off unless your query is about tests.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.16

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered. The description adds useful non-annotation context: the returned field set (id, name, kind, file, line, signature, score) and the hint to read `ranked_by`. It omits pagination/elision behavior, which the schema carries instead.

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?

Three tight sentences, front-loaded with the purpose and routing rule before the return fields. Slightly telegraphic in places ('Read `ranked_by`') but no wasted sentences.

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 compensates by enumerating the returned fields, and it covers usage and the sibling alternative. It is adequate for this tool, though it doesn't explain ranking semantics or paging beyond what the schema states.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented with defaults, bounds, and enums. The description only implies the natural-language query and paging ('plain-language question', 'ranked_by'), adding no syntax or format detail beyond the schema. Baseline 3 applies.

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+resource ('Find code by a plain-language question') and adds the mechanism ('ranked from the graph'), which distinguishes it from lexical siblings. It explicitly contrasts itself with semantic_search by name, so an agent can route 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?

Gives the selecting condition ('when you know what the code does but not its name') and names the alternative tool for the opposite case ('Know the exact name? Use semantic_search'). This is an explicit when/when-not/alternative triad.

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