Skip to main content
Glama

Fetch

fetch
Idempotent

Refreshes remote-tracking refs across selected Git repositories without changing local work, so you can check what is behind before pulling. Requires a selector and previews targets when writes are disabled.

Instructions

git fetch across the selected repos — non-destructive (updates remote-tracking refs only). Use to refresh remote state before checking what is behind. Requires a selector. Executing needs the server launched with --allow-writes; without it (or with dry_run:true) the call just previews the resolved target set.

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": {
      "selector": "<selector>"
    },
    "name": "fetch"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoPreview the resolved target set without acting.
selectorYesPredicate that selects repos across the fleet; set fields to AND them, omit a field for no constraint (ADR-024). Scope: all (bool — the whole fleet), ids[str], name (glob, e.g. "pay*"), path_glob (* stays within one path segment, ** crosses /), root, group (a config-defined cluster name, e.g. "payments"). Local state: dirty, ahead (alias unpushed), behind, diverged, no_upstream, unpublished (a branch never pushed although the repo has a remote), stale_fetch (remote not fetched for over 14 days), has_stash, detached, conflicted, in_operation (merge/rebase/… mid-flight), error, branch (exact name), attention ("any"|"notice"|"warn"|"risk"). Remote (needs a GitHub token): ci ("passing"|"failing"|"pending"|"none"), min_prs (int). Combine: any_of[selector] (OR), not (selector). The empty selector {} matches NOTHING by design — pass {"all": true} for the whole fleet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: it clarifies precisely what is and is not touched ('non-destructive, updates remote-tracking refs only'), and discloses an operational prerequisite not visible anywhere in the structured fields — the server must be launched with --allow-writes or the call degrades to a preview. That write-gating behavior is exactly the kind of auth/behavior detail annotations cannot express.

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 tightly packed sentences with no filler: effect and safety first, then when to use it, then the execution prerequisite. The most consequential constraint (write-gating) is placed prominently rather than buried.

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?

For a tool with a deeply nested selector, no output schema, and mutation-adjacent behavior, the description covers effect scope, usage timing, and the write gate. The only gap is what a successful call returns or how many repos are affected per invocation, which is minor given the absence of an 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 coverage is 100% and the selector's predicate semantics, globs, and empty-selector trap are fully documented in the schema, so the description only needs to reinforce. It adds 'Requires a selector' and ties dry_run to the preview behavior, which is marginal added meaning over the schema's own 'Preview the resolved target set without acting.'

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 ('git fetch across the selected repos') plus the exact scope of effect ('updates remote-tracking refs only'). The fetch-vs-pull distinction is implicit in the wording, so an agent can tell this apart from the sibling 'pull' without opening either schema.

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?

Gives a clear usage context: 'Use to refresh remote state before checking what is behind', which tells the agent this is a preparatory read of remote state rather than a synchronization step. It does not explicitly exclude or name an alternative such as pull, so it stops short of full when/when-not guidance.

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