Skip to main content
Glama

search_hybrid

Run semantic and full-text hybrid search across indexed repositories to find relevant code. Provide a repo path or directory to query existing indexes or register and index new worktrees.

Instructions

Semantic + fulltext hybrid search over indexed repos. Supply 'repo' (absolute checkout/directory path) or 'cwd' (a directory inside it); 'repo' takes precedence. Git worktrees resolve through Git and registered families; directory roots through database registration. A first search can register and index a new linked worktree when its family already permits indexing. Subsequent searches use that checkout's last completed index; incomplete Git operations retain it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoDirectory inside the target checkout or registered directory. Used when 'repo' is absent; no configuration marker is needed.
repoNoAbsolute path of the target checkout/worktree or indexed directory. Optional if 'cwd' is provided.
limitNo
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/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 disclose real side effects: a first search can register and index a new linked worktree when its family permits, and subsequent searches reuse the last completed index. It also notes incomplete Git operations retain the prior index. It omits auth requirements, rate limits, and result format, so it is strong but not complete.

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, then parameter resolution, then indexing behavior — a sensible order with no filler sentences. It is dense with domain jargon (families, registered roots, linked worktrees) that could be tightened, but every sentence carries information.

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 4-param search tool with no output schema and no annotations, the description covers targeting and indexing but says nothing about result shape, ranking, or the meaning of 'limit'. An agent knows how to aim the tool but not what comes back.

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 coverage is 50%: 'cwd' and 'repo' are documented in the schema, while 'limit' and 'query' are bare. The description adds genuine value on the two covered params — absolute path meaning, precedence of 'repo', and worktree-vs-directory-root resolution — but does nothing for the undocumented 'limit', so it only partially compensates.

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 ('Semantic + fulltext hybrid search over indexed repos') and the word 'hybrid' immediately distinguishes it from the sibling search_fulltext and search_semantic tools. An agent can tell what it does without opening the schema.

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 explains how to target a repo (repo vs cwd precedence) but never states when to choose this tool over search_fulltext, search_semantic, or search_structural. The hybrid nature implies 'use when you want both signals,' but the routing decision 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.