Skip to main content
Glama

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

NameRequiredDescriptionDefault
refYesRef 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.
pathYesAbsolute repository directory within configured read roots, including read: folders; top must also be allowed.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.5

TDQS

A4.4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so thoroughly. It discloses network access, disabled credential prompts and helpers, no approval window, suppressed hooks/filters/configured programs, process and timeout limits, 64 KiB output caps, sanitized errors, no auto-retry, and the exact fixed failure reason codes.

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?

The description is dense and front-loaded, leading with the comparison operation and then layering operational constraints. It is efficient overall, though some phrases are telegraphic, such as 'No approval window; client Host in both modes,' which may read as slightly compressed rather than fully clear.

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

Completeness5/5

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

Given the tool's complexity as a network Git read with security constraints and failure modes, and given that an output schema exists, the description covers everything an agent needs to call it correctly. It explains network behavior, credential limitations, timeouts, return failure codes, and retry policy without needing to describe return values already defined by the output schema.

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 100%, so both path and ref semantics are already fully documented in the input schema. The description does not add meaning beyond the schema for either parameter, such as examples or edge cases specific to this tool, so the baseline of 3 applies.

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?

The description states a specific verb-and-resource pair: compare local ref SHA against the remote using ls-remote for the current branch's HTTPS upstream. It also distinguishes itself from siblings by claiming to be the only network Git read tool, giving an agent a clear reason to pick it over local Git tools like git_diff or git_log.

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?

Usage context is clear: it is a network Git read and only works for remotes readable without sign-in because prompts and credential helpers are disabled. The description names failure conditions such as NO_UPSTREAM and HTTPS_UPSTREAM_REQUIRED, which implicitly tells the agent when not to retry, but it does not explicitly name sibling alternatives or state a use-X-instead rule.

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