{
    "slug": "duplicate-remover",
    "name": "Duplicate Remover",
    "url": "https://directory.milunir.com/text-tools/text-formatting/duplicate-remover/",
    "description": "Remove duplicate lines or repeated words from any text and keep the first copy in its original order, with optional case matching and blank-line cleanup.",
    "inputs": {
        "type": "object",
        "properties": {
            "mode": {
                "type": "string",
                "enum": [
                    "lines",
                    "words"
                ],
                "description": "Mode",
                "default": "lines"
            },
            "text": {
                "type": "string",
                "description": "Your text"
            },
            "match_case": {
                "type": "boolean",
                "description": "Match case (Apple and apple stay separate)",
                "default": false
            },
            "trim_spaces": {
                "type": "boolean",
                "description": "Ignore spaces at line ends",
                "default": true
            },
            "drop_blank": {
                "type": "boolean",
                "description": "Remove empty lines",
                "default": false
            }
        },
        "additionalProperties": false,
        "required": [
            "text"
        ]
    },
    "outputs": [
        {
            "key": "primary",
            "label": "Cleaned text"
        },
        {
            "key": "removed",
            "label": "Repeats removed"
        },
        {
            "key": "kept",
            "label": "Kept"
        },
        {
            "key": "total",
            "label": "Items read"
        }
    ],
    "modes": [
        {
            "id": "lines",
            "label": "Duplicate lines",
            "inputs": [
                "text",
                "match_case",
                "trim_spaces",
                "drop_blank"
            ]
        },
        {
            "id": "words",
            "label": "Duplicate words",
            "inputs": [
                "text",
                "match_case"
            ]
        }
    ],
    "feed": null,
    "endpoint": "https://api.tools-directory.workers.dev/v1/tools/duplicate-remover",
    "mcp_tool": "duplicate_remover",
    "example": {
        "inputs": {
            "mode": "lines",
            "text": "ana@example.com\nbo@example.com\nAna@example.com\nana@example.com\ncy@example.com"
        },
        "output": "Cleaned text: ana@example.com\nbo@example.com\ncy@example.com\nRepeats removed: 2\nKept: 3"
    }
}