Skip to main content
Glama
DHCross

Cross Repo Ops MCP

by DHCross

apply_patch

Apply a context-checked patch to a file in a writable repository, replacing old text with new text. Create a new file when old text is empty and create is enabled.

Instructions

Apply a bounded, context-checked patch to a file in a writable repository. If old_text is empty and create=true, creates the file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
repoYes
createNo
contextNo
new_textYes
old_textYes
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It adds meaningful disclosure beyond the name: the patch is 'bounded' and 'context-checked,' and it explicitly specifies the create-file condition when old_text is empty and create=true. It does not mention return values or failure behavior, but it does convey the most important safety-relevant traits.

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 efficient sentence that front-loads the tool's core behavior and adds the key create-condition detail. There is no filler or repetition of schema 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?

The tool has 6 parameters, no output schema, and no annotations, yet the description does not explain what happens on context mismatch, whether the change is staged or only in the working tree, or what the tool returns. This leaves an agent with meaningful uncertainty when invoking a mutating patch tool.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It only explains old_text and create; repo, path, context, and new_text are left entirely to inference from their names. This is only partial compensation for a 6-parameter tool.

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 names a specific verb ('Apply') and resource ('a patch to a file in a writable repository'), and it clarifies a conditional file-creation behavior. It is clearly distinguishable from read-only sibling tools like repo_read and repo_search, though it does not explicitly contrast with git_commit or git_push.

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

Usage Guidelines3/5

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

The phrase 'in a writable repository' implies a prerequisite and suggests this tool is for modifying files, which is useful. However, there is no explicit guidance on when to choose apply_patch over related git siblings, nor any when-not-to-use exclusions.

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/DHCross/cross-repo-ops'

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