Skip to main content
Glama

Gitea: Get file

gitea_get_file
Read-only

Fetch a file’s Base64-encoded contents and metadata from a Gitea repository by specifying the site, owner, repo, and path; optionally include a branch or commit ref.

Instructions

[UNIFIED] Get file contents from a Gitea repository. Returns file content (Base64 encoded) and metadata.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>",
      "owner": "<owner>",
      "repo": "<repo>",
      "path": "<path>"
    },
    "name": "gitea_get_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
pathYes
repoYes
siteYes
ownerYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0
  2. Removedv3.13.1
  3. First observedv3.4.0

TDQS

C2.9/5.0
Behavior3/5

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

readOnlyHint=true already declares this is a safe read operation, so the annotation covers safety. The description does add genuinely useful behavior beyond the annotation by disclosing that content comes back Base64 encoded along with metadata — a real decoding gotcha. It omits what happens on missing paths, whether an error or empty result is returned, and size limits for large files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the action and followed immediately by the return characteristics. No filler, though the "[UNIFIED]" tag adds little for an agent.

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?

For a tool with five parameters at zero schema documentation and no output schema, the definition is too thin. The agent must guess ref/branch behavior and path conventions, and gets no hint that a wrong ref or path yields a distinct failure mode.

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% across five parameters, so the description carries the full burden — and it adds nothing. It never explains that 'ref' defaults to the default branch, that 'path' is repo-relative, or what 'site' identifies, leaving four required parameters semantically opaque.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Get file contents from a Gitea repository") and adds the return shape. It is clearly separable from create_file/update_file/delete_file siblings by name alone, though it never explicitly contrasts itself with gitea_get_tree (directory listing) which is the nearest ambiguous alternative.

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 when-to-use guidance at all: nothing tells the agent how this differs from gitea_get_tree for exploring a repo, or when to prefer a raw-content fetch over listing. No preconditions such as repository visibility or authentication are mentioned.

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

Deploy Server

Other Tools