Skip to main content
Glama

semantic_search

Read-onlyIdempotent

Search code declarations by meaning rather than exact name. Filter by kind, language, and result limit to locate relevant functions, commands, or symbols across a repository.

Instructions

Declarations by name, kind or language. By meaning? semantic_locate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoKind; `command` finds CLI entry points.
limitNoMax rows.
queryYesName pattern.
languageNoLanguage filter.
max_charsNoSoft cap on reply bytes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.7.17
    • changedInput schema / properties / kind / description
      Previous value: -"Entity kind filter (function, class, etc.)"New value: +"Kind; `command` finds CLI entry points."
    • changedInput schema / properties / language / description
      Previous value: -"Language filter (rust, typescript, etc.)"New value: +"Language filter."
    • changedInput schema / properties / limit / description
      Previous value: -"Max results to return"New value: +"Max rows."
    • 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: -"Name pattern to search for"New value: +"Name pattern."
  2. First observedv0.7.16

TDQS

C2.8/5.0
Behavior2/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds nothing beyond that — no note on what is searched, ranking, truncation (max_chars), or whether results are source-backed; its brevity borders on cryptic rather than informative.

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

Conciseness3/5

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

Two telegraphic fragments with zero padding and the disambiguation front-loaded, which is efficient. But the fragment style ('By meaning? semantic_locate.') sacrifices clarity for brevity and reads more like a note than a usable definition.

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

Completeness3/5

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

For a 5-parameter read-only search with no output schema, the description should at least sketch what comes back (declarations plus what fields) and how the filters combine. It names the resource but leaves return shape and filter interaction to the schema and inference.

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 the schema fully documents query, kind, language, limit, and max_chars, making 3 the baseline. The description adds no additional semantics for any parameter, so it earns no uplift.

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

Purpose3/5

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

States the resource (declarations) and the filter axes (name, kind, language), which is more than a restatement of the name, and it explicitly names semantic_locate as the different tool. But the tool is called 'semantic_search' while its own description disclaims meaning-based lookup, and the verb 'search/find' is only implied — an agent can be left unsure how this differs from lexical_lookup.

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

Usage Guidelines3/5

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

It gives one explicit routing rule ('By meaning? semantic_locate.'), which is genuine when-to-use guidance. However, lexical_lookup is the nearest sibling and is not addressed, and no prerequisites, exclusions, or ordering guidance are provided, so the routing is only half-complete.

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