Skip to main content
Glama

search

Find ranked code and knowledge entities by concept using hybrid lexical and semantic retrieval. Use when you know the idea but not the exact name.

Instructions

Ranked search across all entities — code (functions, files, classes) plus rules, observations, and knowledge — using hybrid lexical + semantic retrieval with graph expansion. Use when you know the concept but not the exact name, or want related entities surfaced automatically. For exact identifier/text matches, grep is faster and equally precise.

Input Schema

NameRequiredDescriptionDefault
repoYesAbsolute path to the project root containing `.cogz/`.
limitNo
queryYes
beforeNoOnly use git history committed before this unix timestamp for the co-change channel.
expandNo
recordNoRecord this call as a delivery in usage telemetry. Defaults to true — pass false for inspection reads that must not bump access counts, open deliveries, or feed mining signals.
statusNo
code_searchNoUse the code model (CodeRankEmbed) for query embedding. Applies the CodeRankEmbed query prefix for code-focused search.
entity_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.3
    • addedInput schema / properties / record
      Added value: +{
      +  "default": null,
      +  "description": "Record this call as a delivery in usage telemetry. Defaults to\ntrue — pass false for inspection reads that must not bump\naccess counts, open deliveries, or feed mining signals.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  2. First observedv0.5.6

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full disclosure burden. It does convey retrieval mechanics (hybrid lexical + semantic, graph expansion, ranked output), which is useful behavioral context beyond a bare name. But it omits return shape, result count/pagination behavior, whether the graph expansion is opt-in, and cost/latency characteristics — all material for a 9-parameter retrieval tool invoking an embedding model.

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 sentences, both earning their place, with the core capability front-loaded before the usage guidance. No filler, no restatement of the tool name, and the alternative (grep) is placed last where it belongs.

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

Completeness2/5

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

The tool has 9 parameters, no annotations, no output schema, and only 44% schema description coverage — the description should be doing considerably more work. Notably, with no output schema the description would be the only place to explain what a ranked result looks like, and it does not. The high-level capability is conveyed, but not enough to call the tool confidently.

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

Parameters2/5

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

Schema description coverage is only 44%, so the description must compensate — and it largely does not. It never mentions limit, status, entity_type, before, code_search, or record, and only obliquely gestures at `expand` via the phrase 'graph expansion'. An agent can see names like `status` and `entity_type` in the schema with no stated allowed values and no clarifying text anywhere.

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

Purpose4/5

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

The description names a specific verb and resource scope: ranked search across all entities, including code plus rules, observations, and knowledge, using hybrid lexical + semantic retrieval with graph expansion. That is far more informative than a generic 'search' label. It does not, however, distinguish itself from sibling tools such as query_entities or list_entities, which share the same finding domain — only grep is called out, and that is not a sibling.

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?

It gives a clear use condition (you know the concept but not the exact name, or want related entities surfaced automatically) and an explicit counter-case (exact identifier/text matches — grep is faster and equally precise). That is genuine when/when-not guidance. The gap is that it never positions itself against the closest sibling tools (query_entities, list_entities), which an agent selecting a search tool would most likely be weighing.

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