How to get languages list for tags query

Can not figure out how to get languages (enabled in config and added in panel) in my blueprint as tags query… was trying something like this:

type: tags
options: query
accept: options
separator: ";"
query:
  fetch: kirby.languages.children.toStructure
  text: "{{ page.content.title }}"
  value: "{{ page.content.title }}"

Btw is there way how to debug query? Currently blindly trying different paths and for visually to see data Im putting that query in info field.

Languages are not a method of site but of kirby! so kirby.languages (and nothing after that), but I don’t understand what you are trying to do. Languages have no children. Are you trying to query a structure field instead?

I have template, where in panel users can add language codes as tags (from available languages).
I want defined languages to pass as acceptable tags (options) for tags field.

Currently trying such variants, but got errors:

fetch: kirby.languages.toStructure
or
fetch: kirby.languages.index.pluck("tags", ",", true)

@texnixe thanks for comment. Figured it out, this works:

type: tags
options: query
accept: options
separator: ";"
query:
  fetch: kirby.languages
  text: "{{ item.code }}"
  value: "{{ item.code }}"