Skip to main content
Glama

abapGit Pull

sap_abapgit_pull
DestructiveIdempotent

Pull changes from a remote Git repository into ABAP objects via abapGit, overwriting local versions. Select the repo by name, URL, or key, and optionally specify a branch or transport request.

Instructions

Pull changes from a remote git repository using abapGit API. WARNING: overwrites local ABAP objects. Select the repository by repo (name/URL) or by key (from sap_abapgit_list_repos), not both. If a transport is required the error says so: retry with trkorr=... If 'status unknown', the pull may have run: check the last pull time before retrying. Optional branch switches the repository to that branch persistently (kept only if the pull succeeds) and clears a commit pin.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sap_abapgit_pull"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoabapGit repository key, 1 to 12 digits (zero-padded to 12), as shown by `sap_abapgit_list_repos` (online repositories only). Use it instead of `repo` when name or URL is not unique: abapGit allows two repositories with the same name or URL, the key is the only unique identifier. Exactly one of `repo` and `key`. Unlike the `key` filter of `sap_abapgit_list_repos`, it is not stripped: surrounding blanks are rejected. Needs a report version with P_KEY.
patNoGitHub Personal Access Token (optional for public repos). Falls back to ABAPGIT_PAT env var, then GITHUB_PAT.
repoNoabapGit repository name (hyphens allowed, e.g. MY-PROJECT-ABAP) or its full https URL. Matched exactly by the report, not a pattern. Exactly one of `repo` and `key`; omit the unused one, do not pass an empty string.
branchNoBranch to pull (optional): `main`, `feature/x` or `refs/heads/x`. Without it the repository is pulled on its selected branch. SIDE EFFECT: switches the registered repository to this branch persistently (like a branch switch in the abapGit UI) and clears a commit pin; the switch is kept only if the pull succeeds and is restored on failure. The result's `branch` echoes the full branch the repository is on; `sap_abapgit_list_repos` shows it too.
trkorrNoTransport request (optional, but error if SAP requires it). If pull fails with "Transport required", retry with trkorr.
sessionNoSession ID (e.g., "s1", "s2"). None uses primary session.
agent_idNoAgent identifier for binding check. Optional.
usernameNoGitHub username (optional for public repos)

Output Schema

NameRequiredDescriptionDefault
errorNoError message if failed
actionYesAction type
branchNoFull branch (e.g. refs/heads/main) the repository is on after a pull with a `branch` argument, as echoed by the report; None without a `branch` argument or when the pull failed
messageNoStatus message
successYesWhether the action succeeded
repo_nameYesRepository name; for a pull by key the name from the status text when reliable, else `key <12 digits>`
executed_atYesWhen the action was executed
clicked_actionNoThe action button text that was clicked (e.g., 'Pull', 'Stage')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, but the description adds the concrete consequence ('overwrites local ABAP objects'), the failure semantics of the optional branch switch (persistent switch, cleared commit pin, restored on failure), and the non-deterministic 'status unknown' outcome where the pull may have succeeded. That is meaningful behavior beyond what the annotations 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?

Five tight sentences with the destructive warning placed immediately after the purpose statement, followed by selection rules, recovery guidance, and the branch side effect. No filler, and the highest-risk information is front-loaded.

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?

An output schema exists, so return values need no explanation, and the description still notes that the result's `branch` echoes the effective branch. For an 8-parameter destructive, open-world mutation, all the decision-relevant behavior (overwrite risk, transport requirement, branch persistence, ambiguous status) is covered.

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 consolidating the mutual-exclusivity constraint on repo/key, the trkorr retry contract, and the branch side effect plus commit-pin clearing into the call site. It largely restates what the rich schema already documents, so it does not exceed a 4.

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 ('Pull changes from a remote git repository using abapGit API'), which is unmistakable against the only related sibling, sap_abapgit_list_repos. The scope (remote repository into local ABAP objects) is concrete enough that an agent can select it without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit selection rules (repo XOR key, referencing sap_abapgit_list_repos for the key), an error-recovery path (retry with trkorr=... when a transport is required), and a specific caution for the ambiguous 'status unknown' case (check last pull time before retrying). These are exactly the decision points an agent hits with this tool.

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