Skip to main content
Glama

semantic_locate

Read-onlyIdempotent

Find code by describing what it does in plain words. Supports ranked entity search, pagination, and optional test inclusion.

Instructions

Find code by describing what it does. Know the exact name? semantic_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoRows per page.
queryNoWhat the code does, in plain words.
cursorNo`next_cursor` from the prior page.
max_charsNoSoft cap on reply bytes.
granularityNoRank entities or files.entity
include_testsNoRank test entities too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.7.17
    • removedInput schema / anyOf
      Removed value: -[
      -  {
      -    "required": [
      -      "query"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "cursor"
      -    ]
      -  }
      -]
    • changedInput schema / properties / cursor / description
      Previous value: -"Opaque token from a prior result's `next_cursor`. Pass it back unedited."New value: +"`next_cursor` from the prior page."
    • changedInput schema / properties / granularity / description
      Previous value: -"Rank entities ('entity', default) or roll up to files ('file')"New value: +"Rank entities or files."
    • changedInput schema / properties / granularity / enum
      Previous value: -[
      -  "file",
      -  "entity"
      -]New value: +[
      +  "entity"
      +]
    • changedInput schema / properties / include_tests / description
      Previous value: -"Rank test-role entities alongside source. Off unless your query is about tests."New value: +"Rank test entities too."
    • changedInput schema / properties / limit / description
      Previous value: -"Max ranked rows per page: entities, or files at file granularity. Default 20."New value: +"Rows per page."
    • changedInput schema / properties / max_chars / description
      Previous value: -"Serialized characters this response may occupy; what was cut is named in `elisions`."New value: +"Soft cap on reply bytes."
    • changedInput schema / properties / query / description
      Previous value: -"Natural-language description of the code to find. Optional when paging with `cursor`."New value: +"What the code does, in plain words."
  2. First observedv0.7.16

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered without description help. The description adds no behavioral context beyond a routing rule — no mention of ranking behavior, result shape, or how pagination interacts with the cursor. Adequate but thin.

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?

Two short sentences, zero filler, with the primary action front-loaded and the routing caveat second. Every word earns its place.

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?

For a six-parameter read-only search tool with a fully documented schema and no output schema, the description covers the essential decision (semantic vs. exact-name lookup). It omits pagination flow and the max_chars soft-cap semantics, but those are already carried by the schema.

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 all six parameters (limit, query, cursor, max_chars, granularity, include_tests) are already documented in the schema. The description implies the nature of the query parameter but adds no syntax, default, or interaction detail. 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 ('Find') and resource ('code') with the retrieval modality made explicit ('by describing what it does'). It then contrasts itself against a named sibling, so an agent can route between them without opening schemas.

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 names the alternative (semantic_search) and the condition that selects it ('Know the exact name?'), which is exactly the when-to-use-other-tool guidance that sibling tools require. Nothing about routing is left to inference.

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