Skip to main content
Glama

Gitea: Update file

gitea_update_file
Destructive

Update an existing file in a Gitea repository using the current file SHA to detect conflicts and prevent overwriting concurrent changes.

Instructions

[UNIFIED] Update an existing file in a Gitea repository. Requires current file SHA for conflict detection.

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>",
      "content": "<content>",
      "sha": "<sha>",
      "message": "<message>"
    },
    "name": "gitea_update_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
shaYes
pathYes
repoYes
siteYes
ownerYes
branchNo
contentYes
messageYes
new_branchNo
content_is_base64No

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?

Annotations already declare destructiveHint=true and non-idempotent behavior, so the safety profile is covered. The description adds one genuinely useful behavioral fact beyond that: the current SHA is needed for conflict detection, implying optimistic concurrency. It says nothing about whether new_branch creates a branch, what happens to the original branch, or what a conflict looks like.

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 by the key constraint. The odd "[UNIFIED]" prefix is the only wasted token; otherwise it is efficiently sized.

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 destructive 10-parameter mutation with no output schema and zero schema description coverage, the description is far too thin. It does not cover branch/new_branch behavior, base64 content handling, commit message semantics, or the shape of a successful response.

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 must carry parameter meaning, but it only explains sha (conflict detection). Nine other parameters, including the non-obvious new_branch and content_is_base64, are left with no semantic guidance in either the schema or the description.

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?

Names a specific verb and resource ("Update an existing file in a Gitea repository") and the word "existing" distinguishes it from the sibling gitea_create_file. The "[UNIFIED]" tag adds no meaning for an agent, but the core purpose is unambiguous.

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?

There is no explicit when-to-use guidance, no mention of when to prefer gitea_create_file, gitea_delete_file, or a patch-style sibling, and no indication of when to supply branch versus new_branch. Only the implicit contrast of "existing file" hints at an alternative.

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