Skip to main content
Glama

Search Hybrid

localnest_search_hybrid

Search local codebases using combined lexical and semantic retrieval with RRF ranking to find relevant files and code snippets.

Instructions

Run lexical + semantic retrieval and return RRF-ranked results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
project_pathNo
all_rootsNo
globNo*
max_resultsNo
case_sensitiveNo
min_semantic_scoreNo
auto_indexNo
use_rerankerNo
response_formatNojson

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaNo

Implementation Reference

  • Registration and handler definition for the localnest_search_hybrid tool, which delegates to the search.searchHybrid service method.
    registerJsonTool(
      'localnest_search_hybrid',
      {
        title: 'Search Hybrid',
        description: 'Run lexical + semantic retrieval and return RRF-ranked results.',
        inputSchema: {
          query: z.string().min(1),
          project_path: z.string().optional(),
          all_roots: z.boolean().default(false),
          glob: z.string().default('*'),
          max_results: z.number().int().min(1).max(1000).default(defaultMaxResults),
          case_sensitive: z.boolean().default(false),
          min_semantic_score: z.number().min(0).max(1).default(0.05),
          auto_index: z.boolean().default(true),
          use_reranker: z.boolean().default(false)
        },
        annotations: {
          readOnlyHint: false,
          destructiveHint: false,
          idempotentHint: false,
          openWorldHint: false
        }
      },
      async ({ query, project_path, all_roots, glob, max_results, case_sensitive, min_semantic_score, auto_index, use_reranker }) => normalizeSearchHybridResult(
        await search.searchHybrid({
          query,
          projectPath: project_path,
          allRoots: all_roots,
          glob,
          maxResults: max_results,
          caseSensitive: case_sensitive,
          minSemanticScore: min_semantic_score,
          autoIndex: auto_index,
          useReranker: use_reranker
        }),
        query
      )
    );
Behavior2/5

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

While the description mentions RRF ranking, it fails to explain the non-readonly nature indicated by annotations (readOnlyHint=false). The auto_index parameter implies state modification (creating indices), but the description frames the tool as pure 'retrieval,' obscuring potential side effects and cache/index mutations.

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?

The single sentence is efficiently worded without redundancy, but it is inappropriately brief for a tool with 10 parameters and complex hybrid behavior. It prioritizes brevity over necessary specification.

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?

Given the high complexity (10 parameters, 0% schema coverage, hybrid search methodology), the description is inadequate. It omits parameter documentation, side effects of indexing, corpus scope, and differentiation from the three sibling search tools.

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

Parameters1/5

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

Schema description coverage is 0% and the description provides no parameter guidance whatsoever. Critical parameters like auto_index, min_semantic_score, all_roots, and use_reranker lack any explanation, leaving the agent to guess their semantics and valid usage patterns.

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?

The description explains the retrieval method (lexical + semantic) and ranking algorithm (RRF), but fails to specify what resource is being searched (code, files, or symbols) or distinguish from siblings like localnest_search_code and localnest_search_files. The term 'retrieval' is vague without domain context.

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

Usage Guidelines2/5

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

No guidance provided on when to choose this hybrid approach versus pure lexical (localnest_search_files) or pure semantic search, or when to disable auto_index versus using localnest_index_project separately. No prerequisites or exclusions mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wmt-mobile/localnest'

If you have feedback or need assistance with the MCP directory API, please join our Discord server