Skip to main content
Glama
uneco
by uneco

apply_changes

Destructive

Stage specific lines or ranges from Git changes for partial commits, enabling multiple logical commits from a single file with intermixed changes, including untracked files.

Instructions

Stage selected lines to git index for partial commits (alternative to git add -p).

After using list_changes to view numbered changes, use this tool to selectively stage specific lines or ranges to the git index. This enables creating multiple logical commits from a single file with intermixed changes.

Unlike git add, this tool can stage parts of untracked files (newly created files). You can commit only the first 10 lines of a new file while keeping the rest unstaged.

Number format examples:

  • Single lines: "0001,0002,0005"

  • Ranges: "0001-0010"

  • Combined: "0001-0005,0020-0025"

The tool updates the git index directly and reports remaining unstaged changes, allowing iterative staging for multiple commits from the same file.

Args: path: File path to apply changes to numbers: Change numbers in format: NNNN,MMMM,PPPP-QQQQ

Returns: JSON string with format: {applied: [{file, applied_count, after_applying: {diff, unstaged_lines}}], skipped, stats}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
numbersYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Tool Definition Quality

Score is being calculated. Check back soon.

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/uneco/mcp-git-polite'

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