{"id":"text-invert-unified-patch","version":"1.0.0","description":"Invert a one-file unified patch by swapping file names and delete/insert ops.","supported_operations":["text invert unified patch","reverse a unified diff","invert unified patch hunks"],"unsupported_operations":["offset or fuzz patch apply","preserve original CR/LF through unified text","git diff --git headers","binary patches","fuzzy matching","filesystem access"],"semantics":["unified is one-file unified diff text; strip is an integer 0..8 (default 0) applied to ---/+++ paths before names are swapped.","An empty patch (no hunks) inverts to an empty unified string.","Inversion swaps from_name with to_name, swaps old_* with new_* on each hunk, maps delete to insert and insert to delete, and leaves keep ops unchanged.","Emitted unified always writes both hunk counts with a comma and a newline after every line including the last.","No-newline markers follow inverted body lines whose record eol is empty.","Git multi-file headers, binary markers, and original CR/LF through unified body text are not supported."],"limits":{"max_text_bytes":262144,"max_hunks":1024,"max_path_bytes":1024,"max_strip":8,"max_output_bytes":1048576},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["unified"],"properties":{"unified":{"type":"string","maxLength":262144},"strip":{"type":"integer","minimum":0,"maximum":8}}},"output_schema":{"type":"object","additionalProperties":false,"required":["unified"],"properties":{"unified":{"type":"string","maxLength":1048576}}},"examples":[{"input":{"unified":"--- a\n+++ b\n@@ -1,2 +1,2 @@\n a\n-b\n+c\n"},"output":{"unified":"--- b\n+++ a\n@@ -1,2 +1,2 @@\n a\n+b\n-c\n"}}],"execute_url":"/v1/tools/text-invert-unified-patch/versions/1.0.0/execute"}