Skip to main content
Glama
suyu-creator

github-code-rag-mcp

read_github_file

Read a file from a GitHub repository using the repository URL and file path, then index its content locally for searchable code reuse.

Instructions

读取 GitHub 仓库中某个文件的内容。

读到的代码可以直接复用,需要在代码中标注来源。 文件内容会自动索引到本地,之后可用 search_code 搜索。

Args: url: 仓库 URL (如 https://github.com/owner/repo) path: 文件路径 (如 "src/main.py")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses non-obvious behaviors: file content is automatically indexed locally for later search_code, and code reuse requires source attribution. It does not cover auth or rate limits, but the disclosed side effects are meaningful for a read tool.

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 compact and front-loaded: a one-sentence purpose, two sentences of behavioral notes, and a concise Args list. Every sentence earns its place without redundancy.

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 read-file tool with an output schema, the description covers purpose, parameters, side effects, and usage context. It lacks auth/size caveats, but these are not critical given the tool's simplicity and available schema.

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 compensates by explaining both parameters: url as 'repository URL (e.g., https://github.com/owner/repo)' and path as 'file path (e.g., "src/main.py")'. These examples add meaning beyond bare property names, though advanced options like branch/ref are not mentioned.

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 '读取 GitHub 仓库中某个文件的内容' (read a file's content from a GitHub repository), with a specific verb and resource. It distinguishes itself from sibling tools by noting that the content is auto-indexed locally and can later be searched with search_code.

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 provides clear context: read code can be reused with source attribution, and content is auto-indexed for later search_code. However, it does not explicitly mention when not to use it or name alternatives like list_github_files, so it stops short of fully explicit guidance.

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