Skip to main content
Glama

Gitea: Create files

gitea_create_files
Destructive

Create, update, or delete multiple files in one Gitea commit, letting you batch repository changes with per-file content and SHA handling.

Instructions

[UNIFIED] Create or update multiple files in a single commit. Uses Gitea's /repos/{owner}/{repo}/contents batch endpoint. Per-file operations: create | update | delete. For create/update, pass raw UTF-8 content (default) or a base64 string with content_is_base64=true per file. Delete requires each file's current sha.

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>",
      "message": "<message>",
      "files": "<files>"
    },
    "name": "gitea_create_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYes
siteYes
filesYes
ownerYes
branchNo
messageYes
new_branchNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.14.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and non-idempotent, and the description adds genuinely new behavioral detail: all operations land in one commit, deletes require each file's current sha, and encoding is selectable per file. It does not state what happens on partial failure or whether the commit is atomic, which is the main remaining gap.

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?

Front-loads the core action and scope in the first sentence, then narrows to per-file rules. Dense but readable; the endpoint path is arguably filler for an agent but is brief enough not to hurt.

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

Completeness3/5

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

For a 7-parameter, zero-coverage, no-output-schema mutation tool, the description covers the tricky part (the nested file operations) but leaves branch, new_branch, and message wholly unexplained. An agent could call it, but might misuse new_branch semantics.

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

Parameters3/5

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

Schema description coverage is 0% across 7 parameters, and the description only documents the nested 'files' item fields (operation, content, content_is_base64, sha) — those being the least documented by the bare schema. Site, owner, repo, branch, new_branch, and message receive no explanation, so it only partially compensates for the coverage gap.

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?

States a specific verb and resource ('Create or update multiple files in a single commit') plus the mechanism (Gitea's batch contents endpoint). The emphasis on 'multiple files in a single commit' implicitly distinguishes it from the singular gitea_create_file sibling.

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?

Explains the per-file operation vocabulary (create | update | delete) and the content encoding choice, which guides invocation. However, it never says when to choose this batched tool over gitea_create_file or gitea_create_branch, and gives no prerequisites or failure conditions beyond the sha requirement for deletes.

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