Skip to main content
Glama
suyu-creator

github-code-rag-mcp

search_code

Search keywords in previously read GitHub code to find existing implementations and reuse them before writing new code.

Instructions

在已读过的代码中搜索关键词。

写代码前先搜一下有没有现成的实现,有就直接复用,禁止从零编写。 只能搜到之前用 read_github_file 读过的文件。

Args: query: Search keywords repo: Optional filter by repository name top_k: Number of results (default: 5, max: 20)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNo
queryYes
top_kNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations are provided, so the description carries the transparency burden. It clearly discloses the indexing dependency on read_github_file and implies this is a read-only search over local scope. It doesn't mention edge cases like missing index or result ordering, but the core behavioral boundary is clearly communicated.

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 concise and well-structured: one-sentence summary, clear usage instruction, search scope constraint, and a compact Args list. Every sentence serves a purpose and no unnecessary filler is included.

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 simple three-parameter search tool with an output schema, the description covers scope, prerequisites, when to use, and limitations. It is sufficiently complete for an agent to decide when to invoke this tool and what to expect, although it could mention what happens when there are no previously read files.

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 Args section in the description is essential. It explains all three parameters: query, repo, and top_k, with top_k's default and max limit. The descriptions are not very detailed but they do add practical meaning beyond the bare schema types.

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 states '在已读过的代码中搜索关键词' which clearly identifies a search operation scoped to previously read code. It distinguishes itself from sibling tools like search_github or web_search_github by explicitly limiting results to files read with read_github_file.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit usage guidance: search before writing code and reuse existing implementations instead of writing from scratch. It also clarifies the limitation that only files read via read_get_file are searchable, but it does not explicitly name alternative tools for cases where code has not been read yet.

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/suyu-creator/github-code-rag-mcp'

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