diff-patch-tools

Cloudflare Workers MCP server: diff-patch-tools

我該用這個嗎

品質與安全性

A
說明品質
90%
結構描述完整度
97%
命名品質
80%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

發現項目(2)

  • LOWTool 'apply_patch' description lacks action verb在 apply_patch 中
  • LOWTool 'three_way_merge' description lacks action verb在 three_way_merge 中

根據工具定義與協定合規性的自動化分析。

上下文成本

~562Token(工具定義)
~846 B典型回應大小
極小的注意力影響(128k 上下文的 0.44%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "diff-patch-tools": {
      "url": "https://api.lazy-mac.com/diff-patch-tools/mcp"
    }
  }
}

遠端端點

https://api.lazy-mac.com/diff-patch-tools/mcpstreamable-http

它能做什麼

工具清單

工具(6)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
⚪text_diff(original, modified, context, original_file, modified_file)

Generate a unified diff between two text strings. Ideal for comparing file versions before and after edits.

輸入結構描述

{
  "type": "object",
  "properties": {
    "original": {
      "type": "string",
      "description": "Original text"
    },
    "modified": {
      "type": "string",
      "description": "Modified text"
    },
    "context": {
      "type": "number",
      "description": "Context lines around each change (default 3)"
    },
    "original_file": {
      "type": "string",
      "description": "Label for the original file (default \"original\")"
    },
    "modified_file": {
      "type": "string",
      "description": "Label for the modified file (default \"modified\")"
    }
  },
  "required": [
    "original",
    "modified"
  ]
}
🟢json_diff(original, modified)

Compute a structural diff between two JSON values, showing added, removed, and replaced fields.

輸入結構描述

{
  "type": "object",
  "properties": {
    "original": {
      "description": "Original JSON value (object, array, or JSON string)"
    },
    "modified": {
      "description": "Modified JSON value (object, array, or JSON string)"
    }
  },
  "required": [
    "original",
    "modified"
  ]
}
🟡apply_patch(original, patch)

Apply a unified diff patch to an original text and return the patched result.

輸入結構描述

{
  "type": "object",
  "properties": {
    "original": {
      "type": "string",
      "description": "Original text to patch"
    },
    "patch": {
      "type": "string",
      "description": "Unified diff patch string"
    }
  },
  "required": [
    "original",
    "patch"
  ]
}
⚪three_way_merge(base, ours, theirs, ours_label, theirs_label)

Perform a three-way merge of base, ours, and theirs. Conflicts are marked with standard diff3 conflict markers.

輸入結構描述

{
  "type": "object",
  "properties": {
    "base": {
      "type": "string",
      "description": "Common ancestor text"
    },
    "ours": {
      "type": "string",
      "description": "Our version of the text"
    },
    "theirs": {
      "type": "string",
      "description": "Their version of the text"
    },
    "ours_label": {
      "type": "string",
      "description": "Label for ours in conflict markers (default \"ours\")"
    },
    "theirs_label": {
      "type": "string",
      "description": "Label for theirs in conflict markers (default \"theirs\")"
    }
  },
  "required": [
    "base",
    "ours",
    "theirs"
  ]
}
🟢diff_stats(diff)

Parse a unified diff string and return line-level statistics: additions, deletions, hunks, files changed.

輸入結構描述

{
  "type": "object",
  "properties": {
    "diff": {
      "type": "string",
      "description": "Unified diff string to analyse"
    }
  },
  "required": [
    "diff"
  ]
}
🟡patch_validate(original, patch)

Check whether a unified diff patch can be applied cleanly to an original text without actually applying it.

輸入結構描述

{
  "type": "object",
  "properties": {
    "original": {
      "type": "string",
      "description": "Original text"
    },
    "patch": {
      "type": "string",
      "description": "Unified diff patch string"
    }
  },
  "required": [
    "original",
    "patch"
  ]
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本6 個工具
已驗證未記錄版本6 個工具