Skip to main content
Glama

read_repo_file

Read file contents from Git repositories to view source code, configuration, or documentation. Use this tool to access specific files by providing repository name and file path.

Instructions

Read the content of a single file from a Git repository.

USE THIS TOOL when the user wants to see source code, config, or content of a specific file. Get the path from browse_repo first.

Args: repo_name: Repository name. path: Full file path (e.g. '/src/main.py'). Use forward slashes. branch: Branch name (default: repo's default branch). project: Project name (default from config).

Returns the raw file content with metadata header.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repo_nameYes
pathYes
branchNo
projectNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 the operation (read-only file access), specifies the return format ('raw file content with metadata header'), and mentions default behaviors for branch and project parameters. However, it lacks details on error handling, rate limits, or authentication needs, which would be beneficial for a tool with no annotations.

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 well-structured and front-loaded with the core purpose, followed by usage guidelines, parameter details, and return information. Every sentence adds value without redundancy, and it efficiently covers necessary information in a compact format.

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?

Given the tool's moderate complexity (4 parameters, 2 required), no annotations, and the presence of an output schema (which handles return values), the description is complete. It covers purpose, usage, parameters, and behavioral aspects adequately, leaving no significant gaps for the agent to understand and invoke the tool correctly.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must fully compensate. It provides clear semantics for all 4 parameters: repo_name (repository name), path (full file path with format example), branch (branch name with default behavior), and project (project name with default). The examples and default explanations add significant value beyond the bare schema.

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 specific action ('Read the content of a single file') and resource ('from a Git repository'), distinguishing it from sibling tools like browse_repo (which lists files) and read_s3_file (which reads from S3). It explicitly mentions reading source code, config, or content, making the purpose unambiguous.

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 guidance on when to use this tool ('when the user wants to see source code, config, or content of a specific file') and includes a prerequisite ('Get the path from browse_repo first'), which helps differentiate it from browsing tools. This directly addresses usage context and alternatives.

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/SrujanReddyKallu2024/MCP'

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