{"id":"path-lexical-common-ancestor","version":"1.0.0","description":"Compute the deepest common ancestor directory of a set of paths.","supported_operations":["common ancestor","longest common path prefix","shared ancestor directory"],"unsupported_operations":["stat file","resolve symlinks","filesystem access"],"semantics":["Compute deepest common ancestor directory by comparing normalized segments.","ancestor is common prefix directory path, or null if no common prefix.","depth is number of common directory segments (0 if no common prefix).","Windows: case-insensitive segment comparison. POSIX: case-sensitive.","Paths on different drives return {ancestor:null,format:\"windows\",depth:0}.","Single path input: ancestor is the parent directory of that path."],"limits":{"max_paths":500,"max_path_bytes":4096},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["paths"],"properties":{"paths":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"string","minLength":1,"maxLength":4096}},"format":{"type":"string","enum":["posix","windows","auto"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["ancestor","format","depth"],"properties":{"ancestor":{"type":["string","null"]},"format":{"type":"string","enum":["posix","windows"]},"depth":{"type":"integer","minimum":0}}},"examples":[{"input":{"paths":["/a/b/c","/a/b/d","/a/b/e/f"]},"output":{"ancestor":"/a/b","format":"posix","depth":2}},{"input":{"paths":["/a/x","/b/y"]},"output":{"ancestor":"/","format":"posix","depth":0}},{"input":{"paths":["C:\\a\\b\\c","C:\\a\\b\\d"],"format":"windows"},"output":{"ancestor":"C:\\a\\b","format":"windows","depth":2}}],"execute_url":"/v1/tools/path-lexical-common-ancestor/versions/1.0.0/execute"}