Skip to main content
Glama

search_context

Find relevant code snippets in your project using natural language queries. This tool automatically indexes your codebase and returns semantically related results with file paths and line numbers.

Instructions

Search for relevant code context based on a query within a specific project. This tool automatically performs incremental indexing before searching, ensuring results are always up-to-date. Returns formatted text snippets from the codebase that are semantically related to your query. Supports cross-platform paths including Windows WSL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_root_pathYesAbsolute path to the project root directory. Supports cross-platform paths: Windows (C:/Users/...), WSL UNC (\\wsl$\Ubuntu\home\...), Unix (/home/...), WSL-to-Windows (/mnt/c/...). Paths are automatically normalized.
queryYesNatural language search query to find relevant code context. This tool performs semantic search and returns code snippets that match your query. Examples: 'logging configuration setup initialization logger' (finds logging setup code), 'user authentication login' (finds auth-related code), 'database connection pool' (finds DB connection code), 'error handling exception' (finds error handling patterns), 'API endpoint routes' (finds API route definitions). The tool returns formatted text snippets with file paths and line numbers showing where the relevant code is located.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds valuable context beyond basic functionality: it mentions automatic incremental indexing before searching, ensures results are up-to-date, returns formatted text snippets with file paths and line numbers, and supports cross-platform paths. However, it lacks details on performance, rate limits, or error handling, preventing a perfect score.

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 appropriately sized and front-loaded, with the core purpose stated first. Each sentence adds value: indexing behavior, result format, and platform support. There's minimal waste, though it could be slightly more streamlined by integrating some details more tightly.

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?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is adequate but has gaps. It covers purpose, behavior, and parameters well, but without an output schema, it doesn't fully explain return values (e.g., format of snippets or error cases). This leaves room for improvement in completeness.

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?

The schema description coverage is 100%, meaning the input schema already documents both parameters thoroughly. The description adds some semantic context by mentioning 'cross-platform paths' for project_root_path and giving examples for query, but this doesn't significantly enhance understanding beyond the schema. This meets the baseline for high schema coverage.

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 clearly states the tool's purpose: 'Search for relevant code context based on a query within a specific project.' It specifies the verb (search), resource (code context), and scope (within a specific project). However, without sibling tools, it cannot demonstrate differentiation from alternatives, so it doesn't reach the highest score.

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?

The description implies usage context through phrases like 'within a specific project' and 'Supports cross-platform paths,' but it doesn't explicitly state when to use this tool versus alternatives or provide any exclusions. Since no sibling tools exist, there's no opportunity for comparative guidance, leaving the guidance at an implied level.

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/yeuxuan/Ace-Mcp-Node'

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