Skip to main content
Glama

semantic_search

Find relevant code snippets by searching your codebase with natural language queries to locate functions, classes, or implementations.

Instructions

Perform semantic search across the codebase to find relevant code snippets.

Use this tool when you need to:

  • Find specific functions, classes, or implementations

  • Locate code that handles a particular concept

  • Quickly explore what exists in the codebase

For comprehensive context with file summaries and related files, use get_context_for_prompt instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language description of what you're looking for (e.g., "user authentication", "database connection", "API error handling")
top_kNoNumber of results to return (default: 10, max: 50)
modeNoSearch mode: "fast" (default) uses cached results and moderate expansion; "deep" increases expansion/budget for better recall at higher latency.fast
bypass_cacheNoWhen true, bypass caches for this call (useful for benchmarking or ensuring freshest results).
timeout_msNoMax time to spend on the retrieval pipeline in milliseconds. 0/undefined means no timeout.

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/Kirachon/context-engine'

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