Skip to main content
Glama

search_hybrid_context

Discover code by meaning using hybrid search that combines semantic vectors and graph analysis. Queries natural language descriptions to locate relevant files, signatures, and documentation.

Instructions

Read-only semantic and structural code search combining vector embeddings with graph analysis. Use this for initial codebase discovery to find features by their meaning (e.g., 'user authentication'). Locates code based on natural language descriptions instead of exact keywords, returning relevant files, signatures, and documentation.

⚠️ PREREQUISITE: This tool requires an active knot-mcp server with vector database (Qdrant) and graph database (Neo4j) initialized. If running in lightweight 'only-clients' mode, semantic search is disabled and this tool will fail with: 'Semantic search is disabled in lightweight build. Please use find_callers or explore_file instead.' In such cases, use 'find_callers' for reverse dependency lookups or 'explore_file' for file structure inspection instead.

Behavior & Return: Performs a read-only dual query against vector DB (for semantic similarity) and graph DB (for architectural relationships). Returns Markdown-formatted results with file paths, line numbers, code snippets, and cross-repository dependencies. No side effects.

Usage: Use as your FIRST step when exploring unfamiliar code or discovering architectural patterns. Do NOT use this to find all usages of a specific function—use the 'find_callers' tool for that instead.

Parameter guidance: 'query' should be 2-5 words describing functionality. Increase 'max_results' to 10-20 for broad discovery, keep at 5 for focused search. Include 'repo_name' in your first query to avoid cross-repository pollution.

Supports Java, Kotlin, and TypeScript codebases.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_resultsNoMaximum number of results to return (default: 5)
repo_nameNoOptional but HIGHLY RECOMMENDED: repository name to filter results to a specific codebase (e.g., 'my-java-repo'). If you know the repository you are working on, include this in your FIRST query to avoid mixed results from other indexed projects. Omit only to search across all repositories.
queryYesSearch query describing what you're looking for (e.g., 'user authentication', 'API error handling')
Behavior5/5

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

With no annotations, the description fully covers behavior: read-only, no side effects, returns Markdown results with file paths, line numbers, snippets, and cross-repo dependencies. It also discloses the failure mode for lightweight builds.

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?

The description is well-organized with headers, but slightly lengthy. Each section (purpose, prerequisite, behavior, usage, parameter guidance) is front-loaded and clear, though some redundancy could be trimmed.

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

Completeness5/5

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

Given the tool's complexity and no output schema, the description explains return format, failure modes, supported languages, and provides practical usage tips. It is fully self-contained for an agent to use correctly.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant value by recommending query length of 2-5 words, max_results range, and specifying that repo_name should be included in the first query to avoid cross-repo pollution.

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?

The description clearly states it is a read-only semantic and structural code search combining vector embeddings with graph analysis. It distinguishes itself from siblings like find_callers and explore_file by specifying that it should be used for initial discovery, not for specific function usage.

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 states when to use (first step for codebase discovery) and when not to (use find_callers for specific usages). Also provides a clear prerequisite and fallback instructions for lightweight mode.

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/raultov/knot'

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