Skip to main content
Glama
kvnpetit

SRC (Structured Repo Context)

by kvnpetit

search_code

Find code by meaning using natural language queries to locate authentication logic, error handling, and other concepts with file locations and call relationships.

Instructions

Search code semantically using natural language queries. USE THIS to find code by concept/meaning (e.g., 'authentication logic', 'error handling'). Requires index_codebase first. Returns relevant code chunks with file locations, function names, and call relationships (who calls what).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesNatural language search query
directoryNoPath to the indexed directory (defaults to current directory).
limitNoMaximum number of results to return
thresholdNoMaximum distance threshold for results (lower = more similar)
modeNoSearch mode: 'vector' (semantic only), 'fts' (keyword only), 'hybrid' (combined with RRF fusion)hybrid
includeCallContextNoInclude caller/callee information for each result (uses cached call graph)
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 effectively describes key behaviors: the semantic search capability, prerequisite indexing requirement, and what information is returned (code chunks with file locations, function names, call relationships). However, it doesn't mention performance characteristics, rate limits, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured in three sentences: the core purpose, usage guidance with examples, and return value information. Every sentence adds value with zero wasted words, and the 'USE THIS' directive is appropriately front-loaded for clarity.

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

Completeness4/5

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

For a 6-parameter search tool with no annotations and no output schema, the description provides good context about purpose, usage prerequisites, and return format. However, it doesn't explain the search algorithm's limitations, how results are ranked, or what happens when no matches are found, leaving some gaps in behavioral understanding.

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 description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. The baseline score of 3 reflects that the schema does the heavy lifting for parameter documentation.

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 the tool's purpose with specific verbs ('search code semantically') and resources ('code chunks with file locations, function names, and call relationships'). It distinguishes from potential keyword-based search by emphasizing 'semantically using natural language queries' and provides concrete examples ('authentication logic', 'error handling').

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?

The description provides explicit usage guidance: 'USE THIS to find code by concept/meaning' establishes the primary use case, 'Requires index_codebase first' specifies a critical prerequisite, and the examples clarify appropriate query types. This gives clear when-to-use guidance relative to the sibling tools.

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/kvnpetit/structured-repo-context-mcp'

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