Skip to main content
Glama

Add a push mirror

add_push_mirror

Set up automatic push mirroring from a Forgejo/Codeberg repository to an external Git remote, so changes sync without a local git push.

Instructions

Add a push mirror so Forgejo/Codeberg auto-pushes this repo to an external remote (e.g. a GitHub mirror), keeping it in sync without a local git push. Requires write mode. The push credential is taken from the server's FORGEJO_MIRROR_TOKEN env var — never pass it as an argument; or set use_ssh=true for key auth.

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name.
ownerYesRepository owner.
use_sshNoAuthenticate to the remote with an SSH key instead of a password token. When true no username/token is sent and the response carries a `public_key` to add on the remote.
intervalNoSync interval in Forgejo duration form (e.g. `8h0m0s`; `0` disables periodic sync). Defaults to `8h0m0s`.
branch_filterNoOptional glob branch filter (e.g. `main,release/*`); empty mirrors all branches.
remote_addressYesTarget git URL to push to, e.g. `https://github.com/you/repo.git`.
sync_on_commitNoAlso push right after each push to this repo (near-real-time). Defaults to true.
remote_usernameNoUsername on the remote (e.g. your GitHub username). Required for password auth; ignored when `use_ssh` is true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.22.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing a non-obvious credential model: the token comes from the server's FORGEJO_MIRROR_TOKEN env var and must never be passed as an argument. It also explains the use_ssh branch and that the response then carries a `public_key` to install on the remote — exactly the kind of side-effect/auth detail annotations cannot convey.

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?

Three sentences, front-loaded with the purpose, then prerequisites and credential handling. No filler; the parenthetical example ('e.g. a GitHub mirror') makes the intent concrete in a few words.

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?

There is no output schema, and the description covers the notable return case (public_key when use_ssh=true) plus the write-mode requirement, which is sufficient to call it correctly. It omits failure behavior and whether the mirror syncs immediately on creation, a minor gap for a mutating tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds value by clarifying that no credential parameter exists (env-var sourced) and by framing use_ssh as the key-auth path, discouraging an agent from inventing a token argument. It adds no detail on interval, branch_filter, or sync_on_commit beyond the 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?

States a specific verb and resource ('Add a push mirror') and explains the mechanism concretely: Forgejo/Codeberg auto-pushes this repo to an external remote without a local `git push`. This clearly separates it from siblings like delete_push_mirror, list_push_mirrors, and sync_push_mirrors.

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

Usage Guidelines4/5

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

Explicitly gives the precondition 'Requires write mode' and names the SSH alternative ('or set use_ssh=true for key auth'), which is actionable guidance. It does not explicitly contrast with sync_push_mirrors (manual trigger vs. scheduled) or state when-not-to-use, so it falls short of the top band.

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