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
Behavior4/5

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

Annotations indicate destructiveHint=true and readOnlyHint=false, which the description aligns with by stating 'updates the git index directly' and 'reports remaining unstaged changes'. It adds valuable context about iterative staging and handling of untracked files, though it doesn't detail rate limits or auth needs beyond annotations.

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 is front-loaded with the core purpose, followed by usage guidelines, examples, and behavioral details in a logical flow. Every sentence adds value, such as clarifying capabilities with untracked files and providing format examples, with no wasted text.

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 (destructive operation with partial staging), the description is complete: it explains the purpose, usage, parameters, and behavior, and with an output schema present, it doesn't need to detail return values, covering all necessary context for effective use.

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?

With 0% schema description coverage, the description compensates by explaining both parameters: 'path' as 'File path to apply changes to' and 'numbers' with detailed format examples (e.g., '0001,0002,0005', '0001-0010'), adding meaning beyond the basic schema types.

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 clearly states the specific action ('Stage selected lines to git index for partial commits') and resource ('git index'), distinguishing it from siblings like 'auto_commit' and 'unstack' by emphasizing selective staging for partial commits, unlike full-file operations.

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?

It explicitly states when to use this tool ('After using list_changes to view numbered changes') and provides alternatives ('alternative to `git add -p`'), with clear differentiation from siblings by noting it can stage parts of untracked files, unlike typical 'git add'.

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

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