Skip to main content
Glama

get_file_content

Read-only

Read any file from a Forgejo repository by specifying owner, repo, path, and optional ref. Returns UTF-8 content as text or base64 for binary files.

Instructions

Read a file. UTF-8 content returns as text; anything else as base64.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
repoYes
ownerYes
filepathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

The annotation readOnlyHint=true already signals a safe read operation, and the description adds meaningful behavior beyond that: UTF-8 content is returned as text while non-UTF-8 content is base64-encoded. This is an important operational detail that the schema and readOnly hint do not convey. It does not contradict the 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?

Two short sentences with no filler. The main purpose is front-loaded, and the encoding note is the only extra detail, which is essential. Every word earns its place.

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 read-only file retrieval tool, the description is nearly complete: it specifies the operation and the surprising encoding behavior, while the readOnlyHint covers the safety profile and the output schema covers the return shape. The main missing context is the semantics of ref, but it is optional and appears in the schema with a default.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the burden of explaining parameters, but it only says 'Read a file.' The owner, repo, and filepath fields are inferable from their names, but the optional ref parameter is left ambiguous—no mention that it selects a branch, tag, or commit SHA. This is a meaningful gap for correct invocation.

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 opens with a precise verb and resource: 'Read a file.' The second sentence adds a key behavioral detail about encoding. This clearly distinguishes get_file_content from sibling mutation tools like create_file, update_file, and delete_file, and from metadata tools like get_commit.

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

Usage Guidelines3/5

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

The description makes the core use case evident—reading file content—so an agent can infer when to call it. However, it does not explicitly state when not to use it or name alternatives such as get_commit for commit data or update_file for modifications. The usage context is implied rather than spelled out.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/JakePeralta7/forgejo-mcp'

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