Skip to main content
Glama
jahrulnr

mcp-docker-agentic

by jahrulnr

docker_apply_patch

Apply unified diffs to files inside a Docker container. Supports dry-run and strip level, trying multiple patch methods for compatibility.

Instructions

Apply a unified diff inside a Docker container. Tries apply_patch (strip=0 only), then git apply, then patch. Supports dry-run and strip level.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patchYesUnified diff to apply.
stripNoNumber of leading path components to strip (-p<N>).
dry_runNoSimulate the patch application without changing files.
containerYesDocker container name or id.
Behavior4/5

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

With no annotations, the description carries full behavioral disclosure. It adds valuable insight by revealing the fallback order (apply_patch, git apply, patch) and the constraint that apply_patch only supports strip=0. This goes beyond the schema, though it stops short of explaining failure modes or permissions.

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 two sentences, front-loaded with the core purpose, and every word earns its place. It efficiently communicates the mechanism, fallback, and supported options without any fluff.

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

Completeness3/5

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

No output schema is present, so the description should clarify return values or error behavior, but it does not. It adequately covers what the tool does and how it tries to apply the patch, but leaves out failure handling and what the output might look like, which is a gap for a mutation tool.

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?

Schema already covers all 4 parameters with descriptions (100% coverage), so the baseline is 3. The description adds extra meaning by explaining how the 'strip' parameter interacts with the backend fallback (apply_patch only works with strip=0), and it confirms dry-run support, enriching the agent's understanding.

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 tool's purpose: 'Apply a unified diff inside a Docker container.' This uses a specific verb (apply) and resource (Docker container) and distinguishes it from sibling file operations like docker_write_file and docker_read_file.

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 description implies usage for applying diffs but provides no explicit guidance on when to use this tool versus alternatives like docker_write_file or docker_exec. No exclusions or alternative tools are mentioned, leaving the agent to infer the appropriate context.

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/jahrulnr/mcp-docker-agentic'

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