{"id":"path-lexical-sanitize","version":"1.0.0","description":"Sanitize an untrusted path to produce a safe relative path, stripping roots, drive letters, traversal segments, and illegal characters.","supported_operations":["sanitize path","path security sanitize","safe relative path","strip path traversal","strip illegal filename characters"],"unsupported_operations":["stat file","resolve symlinks","filesystem access","guarantee filesystem safety on all OS versions"],"semantics":"Strip drive letters and UNC roots. Resolve and collapse \"..\" to prevent escape above implicit base. Strip null bytes, illegal chars (< > : \" | ? * and control 0x00-0x1F, 0x7F). Replace Windows reserved names. If allow_dots is false, strip leading-dot segment names. was_safe: true if no changes were needed.","limits":{"max_path_bytes":4096,"max_replacement_bytes":64},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","required":["path"],"properties":{"path":{"type":"string","maxLength":4096},"replacement":{"type":"string","maxLength":64},"allow_dots":{"type":"boolean"}}},"output_schema":{"type":"object","required":["sanitized","was_safe","changes"],"properties":{"sanitized":{"type":"string"},"was_safe":{"type":"boolean"},"changes":{"type":"array","items":{"type":"string"}}}},"examples":[{"input":{"path":"safe/relative/file.txt"},"output":{"sanitized":"safe/relative/file.txt","was_safe":true,"changes":[]}},{"input":{"path":"C:\\Users\\..\\..\\etc\\passwd"},"output":{"sanitized":"etc/passwd","was_safe":false,"changes":["stripped drive letter C:","removed directory traversal segments"]}},{"input":{"path":"../../../secret"},"output":{"sanitized":"secret","was_safe":false,"changes":["removed directory traversal segments"]}},{"input":{"path":"file<name>.txt"},"output":{"sanitized":"filename.txt","was_safe":false,"changes":["stripped illegal characters: <, >"]}},{"input":{"path":"CON.txt"},"output":{"sanitized":".txt","was_safe":false,"changes":["replaced Windows reserved name: CON"]}}],"execute_url":"/v1/tools/path-lexical-sanitize/versions/1.0.0/execute"}