Skip to main content
Glama

git_apply_patch

Destructive

Apply a unified diff patch to a local git repository with write mode enabled. Integrates to modify code directly.

Instructions

Apply a unified diff patch. Requires local git write mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patchYes
repo_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations already mark this as destructive (destructiveHint=true). The description adds that it writes to the git repo, providing marginal context beyond the annotation, but does not detail potential side effects like file overwrites or merge conflicts.

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 a single, concise sentence that front-loades the core action and a key requirement. No redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description lacks usage context for a destructive git operation. It omits error conditions, conflict behavior, and how this tool relates to other git operations like git_commit. The brief description is insufficient for reliable agent decision-making.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description adds no parameter information. The two parameters (patch, repo_path) are left entirely to the agent to infer from names, with no explanation of format, defaults, or behavior.

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 states 'Apply a unified diff patch', a specific verb+resource pair. It clearly distinguishes from sibling git diff/show/commit tools which deal with creating or viewing diffs rather than applying them.

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

Usage Guidelines2/5

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

Only a prerequisite is given ('Requires local git write mode'), with no guidance on when to use this tool over alternatives or when not to use it. No exclusions or explicit context are provided.

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/djtelicloud/grok-mcp-server'

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