Skip to main content
Glama
AxelHu
by AxelHu

apply_patch

apply_patch

Apply a code patch to one or more files using the Begin/End Patch format to automatically modify file content.

Instructions

Apply a patch to one or more files using the apply_patch format. The input should include *** Begin Patch and *** End Patch markers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesPatch content using the *** Begin Patch/End Patch format.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description must fully disclose behavior. It states the tool applies patches and uses markers, but it does not mention side effects like file modification, potential for partially applied patches, rollback capability, or whether it creates files that don't exist. Key behavioral traits are missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded with the core purpose. It uses two sentences effectively, but the repeated mention of 'apply_patch format' is slightly redundant.

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?

Given the tool modifies files, it lacks details on safety, rollback, or how partial patches are handled. With no output schema and no annotations, the description should cover failure modes and post-conditions, which it omits.

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?

Schema coverage is 100%, and the description adds minor context about the format markers beyond the schema's generic 'Patch content' description. However, it does not explain the patch syntax (e.g., unified diff), allowed operations, or error handling if format is invalid.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool applies a patch to files and specifies the patch format with markers. However, it does not distinguish itself from siblings like 'exec' or 'process', which might also apply changes.

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?

No guidance on when to use this tool vs alternatives like 'read' or 'exec'. The description lacks context on prerequisites, such as whether files must exist or be writable, and does not mention that 'apply_patch' is specifically for applying patch diffs versus directly editing files.

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/AxelHu/chatgpt-web-agent'

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