Skip to main content
Glama
mehrdad03

LocalDev MCP

by mehrdad03

Apply a unified diff patch to one project file

apply_patch

Apply a patch to a file after confirming its SHA256 checksum matches the expected hash.

Instructions

Preferred write tool for focused code edits. Read the file first and pass expectedSha256.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patchYes
projectYesProject key from list_projects.
expectedSha256Yes
Behavior3/5

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

The description reveals that the tool requires expectedSha256 to ensure the file hasn't changed, adding safety context beyond annotations. All annotations are false, and the description aligns with a write operation. Missing details on error handling or rollback.

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?

Two concise sentences: first states purpose and preference, second provides a critical instruction. No redundant words, ideal front-loading.

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?

Covers the key usage instruction (read file and pass hash) but omits behavior on hash mismatch or patch apply failure. With no output schema and moderate sibling complexity, the description is minimally adequate.

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 low (25%), with only project having a description. The description clarifies expectedSha256's purpose (ensuring correct version) and mentions 'unified diff' in the title. But path and patch format lack explanation.

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 this tool applies a unified diff patch to one project file and is the 'preferred write tool for focused code edits.' It distinguishes from siblings like write_file and replace_text by emphasizing focused edits, but lacks explicit differentiation.

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 advises reading the file first and passing expectedSha256, implying a prerequisite and safety check. However, it does not specify when not to use this tool (e.g., for large modifications) or mention alternatives like write_file or replace_text.

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/mehrdad03/localdev-mcp'

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