# Drawstep engine · Triggers · `shufflesLibrary` > Shuffles library — Whenever a player shuffles their library. Engine: Magic: The Gathering (`mtg`). This is one primitive of the Drawstep card vocabulary; field names and the discriminator are exact. Wiki page: https://drawstep.xyz/wiki/mtg/triggers#shufflesLibrary ## Where it goes The `trigger` of a triggered ability: `{ "kind": "triggered", "trigger": { "event": "shufflesLibrary", … }, "effects": [ … ] }`. The common trigger fields (`filter`, `by`, `other`, `condition`, `damageKind`, `oneOrMore` …) are on the triggers page. ## Fields No fields besides the discriminator. ## Related - [Triggers](https://drawstep.xyz/wiki/mtg/triggers.md) — the whole topic - [Start here](https://drawstep.xyz/wiki/mtg/start.md) — the rules, the output contract and the index of every primitive