git_remote_check
Compare a local Git ref with its current branch's HTTPS upstream to check whether they match, reading only credential-free remotes.
Instructions
Compare local ref SHA with ls-remote of the current branch's HTTPS upstream. The only network Git read tool; prompts and credential helpers disabled, so it works only for remotes readable without sign-in. On failure returns status ERROR with a fixed reason code: NO_UPSTREAM (no upstream remote), HTTPS_UPSTREAM_REQUIRED, REMOTE_READ_FAILED (private, missing or unreachable; never retry with credentials). No approval window; client Host in both modes. Fixed Git never runs repository hooks/filters or configured programs. Maximum 4 processes, local 15s/network 20s, 64 KiB each. Sanitized errors; never auto-retry.
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": {
"path": "<path>",
"ref": "<ref>"
},
"name": "git_remote_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Ref to compare: a short name such as main means refs/heads/main; give refs/tags/... for a tag. 1..200 ASCII letters/digits or ._/@^~-; no leading -, .. or colon. | |
| path | Yes | Absolute repository directory within configured read roots, including read: folders; top must also be allowed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||