Skip to main content
Glama

Git Cherry-Pick

git_cherry_pick

Apply specific commits from other branches to your current branch without full merges. Resolve conflicts, configure merge strategies, and optionally stage changes only for controlled integration.

Instructions

Cherry-pick commits from other branches. Apply specific commits to the current branch without merging entire branches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to the Git repository. Defaults to session working directory set via git_set_working_dir..
commitsYesCommit hashes to cherry-pick.
noCommitNoDon't create commit (stage changes only).
continueOperationNoContinue cherry-pick after resolving conflicts.
abortNoAbort cherry-pick operation.
mainlineNoFor merge commits, specify which parent to follow (1 for first parent, 2 for second, etc.).
strategyNoMerge strategy to use for cherry-pick.
signoffNoAdd Signed-off-by line to the commit message.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesIndicates if the operation was successful.
pickedCommitsYesCommits that were successfully cherry-picked.
conflictsYesWhether operation had conflicts.
conflictedFilesYesFiles with conflicts that need resolution.
Behavior3/5

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

The annotations indicate readOnlyHint: false, and the description confirms this is a write operation ('Apply... to current branch'). However, it fails to disclose important behavioral traits: that cherry-picking creates new commit hashes (doesn't move originals), that it can result in conflicts requiring resolution, or that the working directory must be clean. These are material omissions given the tool's complexity.

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?

The description consists of two efficient sentences with zero redundancy. It is well-structured with the core action front-loaded ('Cherry-pick commits') followed immediately by the value proposition/distinction from alternatives. Every word earns its place.

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?

Given the rich input schema (100% coverage) and presence of an output schema, the description appropriately focuses on conceptual explanation rather than implementation details. It is complete enough for tool selection, though mentioning the conflict resolution workflow would improve operational completeness given the existence of continueOperation/abort parameters.

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?

With 100% schema description coverage, the baseline is appropriately met. The description adds semantic context that commits come 'from other branches', which complements the commits parameter. However, it does not clarify the relationship between the mutually exclusive operational modes (noCommit, continueOperation, abort) or when to use the mainline parameter.

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 uses specific verbs ('Cherry-pick', 'Apply') and clearly identifies the resource (commits from other branches). The second sentence effectively distinguishes this from git_merge by emphasizing 'without merging entire branches', making the scope distinct from sibling tools.

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?

The description provides clear context for when to use this tool—when you need specific commits rather than entire branch merges. However, it lacks explicit guidance on conflict resolution workflows (despite the continueOperation/abort parameters) and doesn't mention when to prefer this over git_rebase for similar commit selection tasks.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/git-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server