When an attacker that you can see hits you with an attack roll, you can take a Reaction to halve the attack's damage against you (round down).
Uncanny Dodge
Raw data
{
"name": "Uncanny Dodge",
"page": 129,
"level": 5,
"srd52": true,
"__prop": "classFeature",
"source": "XPHB",
"entries": [
"When an attacker that you can see hits you with an attack roll, you can take a {@variantrule Reaction|XPHB} to halve the attack's damage against you (round down)."
],
"className": "Rogue",
"classSource": "XPHB",
"basicRules2024": true
}