Currently, lua can read gadget definitions by parsing MediaWiki:Gadgets-definition. Enwiki implements this in Module:Gadgets. Use cases:
- Showing which gadget(s) the current script page belongs to via an interface message. (Currently implemented in Module:Script doc auto)
- Having a templated part of the description message which indicates whether the gadget is default. (Currently this is maintained manually, eg. MediaWiki:Gadget-refToolbar)
The above would not be possible with the switch to JSON repo, as definitions are across multiple pages and lua does not have a way to list pages by contentmodel. To address this, we can expose gadgets' metadata natively to Scribunto.