Skip to main content
Glama

get_file_contents

Retrieve file contents or list directories from GitHub repositories with read-only access through a secure gateway.

Instructions

Read a UTF-8 text file or list a directory in an accessible GitHub repository. Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
pathYes
repoYes
ownerYes
max_charsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the read-only nature and the UTF-8 constraint, which are useful. However, it omits details about max_chars truncation, behavior for binary files, error handling, or what 'accessible' means in terms of permissions.

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 a single, concise sentence that front-loads the core purpose without wasted words. It is appropriately small and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the tool's complexity (dual file/directory behavior, optional ref, max_chars limit) is not addressed. One line is insufficient for a 5-parameter tool, and key behaviors and parameters remain undocumented.

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

Parameters1/5

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

The input schema has five parameters with 0% description coverage. The tool description does not explain the meaning of owner, repo, ref, max_chars, or how path selects between file and directory listing. It adds no value beyond the raw 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 tool reads UTF-8 text files or lists directory contents in a GitHub repository, using specific verbs and a clear resource. It is easily distinguishable from sibling tools like search_code, get_repository, and list_repositories.

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives, such as whether to prefer search_code for code search or get_repository for metadata. The phrase 'in an accessible GitHub repository' hints at prerequisites but provides no explicit exclusions or use cases.

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/Vatsal212005/ContextBridge'

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