{
  "slug": "text-diff",
  "name": "gizza-ai/text-diff",
  "version": "0.1.0",
  "title": "Text Diff — gizza.ai",
  "description": "Compare two text blocks and highlight added, removed, and changed lines.",
  "tags": [
    "text",
    "diff",
    "developer"
  ],
  "category": "text",
  "urls": {
    "page": "https://gizza.ai/tools/text-diff/",
    "markdown": "https://gizza.ai/tools/text-diff/index.md",
    "descriptor": "https://gizza.ai/tools/text-diff/tool.json",
    "deep_link_example": "https://gizza.ai/tools/text-diff/?left=alpha%0Abeta%0Agamma&right=alpha%0ABETA%0Agamma%0Adelta&format=unified&ignore_case=true&ignore_whitespace=true&context=3"
  },
  "cli": "gizza tool text-diff \"alpha\nbeta\ngamma\" 'right=alpha\nBETA\ngamma\ndelta'",
  "tool": {
    "description": "Compare two blocks of text line-by-line. Produces either a classic unified diff with added/removed/context lines or a structured JSON report with added, removed, changed, and unchanged counts. Supports optional case-insensitive and whitespace-normalized matching while preserving original text in the output.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "context": {
          "default": 3,
          "description": "Unchanged context lines around each hunk in unified output. Default 3.",
          "maximum": 100,
          "minimum": 0,
          "type": "integer"
        },
        "format": {
          "default": "unified",
          "description": "Output format: unified diff text or a structured JSON report.",
          "enum": [
            "unified",
            "json"
          ],
          "type": "string"
        },
        "ignore_case": {
          "default": false,
          "description": "Compare lines case-insensitively while preserving original text in the output.",
          "type": "boolean"
        },
        "ignore_whitespace": {
          "default": false,
          "description": "Normalize runs of whitespace for matching while preserving original text in the output.",
          "type": "boolean"
        },
        "left": {
          "description": "The original/left text to compare.",
          "type": "string"
        },
        "right": {
          "description": "The updated/right text to compare.",
          "type": "string"
        }
      },
      "required": [
        "left",
        "right"
      ],
      "type": "object"
    }
  }
}