Skip to main content
Glama
aarontrmartin

cindex

search_code

Performs semantic search over code and docs to find code by meaning, not exact text. Returns file path, line numbers, symbol, score, and snippet with optional path prefix.

Instructions

Semantic search over this repo's code and docs. Finds code by meaning (e.g. "where do we refuse a mismatched database"), not just exact text — use it before falling back to grep. Returns JSON: file_path, start/end lines, symbol, score, snippet. Optional path_prefix restricts results to a subtree (e.g. "src/").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes
path_prefixNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so the description carries the burden. It discloses that the tool returns JSON with specific fields (file_path, start/end lines, symbol, score, snippet) and supports optional path_prefix. No destructive behaviors implied; it is a read-only search, which is clear from context.

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?

Three sentences: first states purpose, second explains how it differs from grep, third describes output and optional features. No wasted words, front-loaded with main action.

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?

For a search tool, the description covers the essential: what it searches, how it differs from alternatives, what it returns, and optional parameters. Even though the output schema is mentioned as present in context, the description itself adequately describes the return format. No major gaps.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate. It explains the query parameter (the search term), path_prefix with an example ('src/'), but does not mention the k parameter (integer, default 8). The return fields described are not parameters, so partial coverage.

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 performs semantic search over code and docs, distinguishes itself from exact text search (grep), and provides a concrete example query. The verb 'search' and resource 'code and docs' are specific.

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 advises use before falling back to grep, establishing a clear ordering between tools. Also explains the path_prefix parameter to restrict results to a subtree, guiding when to use that.

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/aarontrmartin/code-indexer'

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