Skip to main content
Glama
aserper

RTFD (Read The F*****g Docs)

by aserper

get_file_content

Retrieve file content from GitHub repositories to examine source code, understand implementations, or read configuration files directly.

Instructions

        Get content of a specific file from a GitHub repository.

        USE THIS WHEN: You need to read the actual source code or contents of a specific file.

        BEST FOR: Examining implementation details, understanding how code works, or reading configuration files.
        Returns the full file content (UTF-8 text only, binary files are rejected).

        Automatically handles:
        - Base64 decoding from GitHub API
        - UTF-8 conversion with safe truncation
        - Binary file detection

        Args:
            repo: Repository in format "owner/repo" (e.g., "psf/requests")
            path: Path to file (e.g., "requests/api.py")
            max_bytes: Maximum content size (default 100KB, increase for large files)

        Returns:
            JSON with file content, size, truncation status, and metadata

        Example: get_file_content("psf/requests", "requests/api.py") → Returns source code of api.py
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYes
pathYes
max_bytesNo
Behavior4/5

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

With no annotations provided, the description carries full burden and does an excellent job disclosing behavioral traits: it specifies UTF-8 text only with binary file rejection, describes automatic handling (base64 decoding, UTF-8 conversion, truncation), mentions default max_bytes and that it can be increased, and describes the JSON return structure. It doesn't mention rate limits or authentication needs, but covers most other important aspects.

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 with clear sections (purpose, usage guidelines, automatic handling, parameters, returns, example) and every sentence adds value. It's appropriately sized for a tool with 3 parameters and complex behavior, with the most important information (what it does and when to use it) presented first.

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 tool with 3 parameters, no annotations, and no output schema, the description provides complete context: clear purpose, usage guidelines, behavioral details, parameter semantics, return format description, and an example. It addresses all aspects needed for an agent to understand and use this tool effectively.

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?

With 0% schema description coverage, the description fully compensates by providing clear semantics for all 3 parameters: repo format ('owner/repo'), path meaning ('Path to file'), and max_bytes purpose ('Maximum content size') with default value and usage guidance. The example further clarifies parameter usage with concrete values.

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 a specific verb ('Get content') and resource ('specific file from a GitHub repository'), distinguishing it from sibling tools like get_repo_tree (which lists contents) or fetch_github_readme (which fetches only README files). It explicitly mentions reading source code or configuration files, making the scope 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 includes explicit 'USE THIS WHEN' and 'BEST FOR' sections that clearly state when to use this tool (e.g., 'need to read the actual source code or contents of a specific file') and what it's best for (e.g., 'examining implementation details'). This provides strong guidance compared to alternatives like list_repo_contents or github_code_search.

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/aserper/RTFD'

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