Skip to main content
Glama
dxawdc

Secure Local Workspace MCP

by dxawdc

Apply a guarded unified patch

apply_patch

Apply a unified diff to a text file after verifying its SHA-256 checksum to ensure integrity before patching.

Instructions

Apply a unified diff to one existing text file after verifying the SHA-256 returned by read_file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
patchYes
projectIdYes
expectedSha256Yes
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false. The description adds the guard context (verification step) which is useful, but it does not disclose what happens on patch failure, SHA mismatch, or non-existent file. No contradiction with annotations.

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?

A single, front-loaded sentence that communicates the core action and the guard with zero wasted words. Exemplary conciseness.

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?

Adequate for a guarded mutation tool but incomplete: it does not describe failure behavior, whether changes are reversible, or what happens on SHA mismatch. Given the potential consequences of applying patches, more detail would strengthen completeness.

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?

The description adds meaning to expectedSha256 (the hash returned by read_file) and patch (unified diff format), which helps beyond the bare schema. However, projectId and path are left to inference, and with 0% schema coverage, more compensation would be expected.

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 a specific verb ('apply'), resource ('unified diff to one existing text file'), and a distinctive guard (SHA-256 verification). It clearly distinguishes itself from sibling tools like create_text_file and delete_text_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 the prerequisite of calling read_file first (to obtain the SHA-256) but does not explicitly state when to use this tool versus alternatives like create_text_file. It lacks explicit 'when not to use' or alternative routing.

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/dxawdc/secure-local-workspace-mcp'

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