Skip to main content

Widget rows

Some widgets draw a view from data, for example an HTML page or a plugin's chart. Such a widget can also answer with the data itself, as rows, so that the AI Agent, MCP clients and the user can read what the view shows. The key raw enables this, and it is available on html widgets and on every plugin type.

The keys raw, data.rawDataKey and data.rawType are listed under Widget definition on widgets.json. Make a widget readable by the Agent explains what the host does with the rows.

Where the rows come from​

The host reads the rows from the response of the widget's request with raw=true, which Widget requests describes. The function rowsOf in frontend/src/lib/utils/rawRows.ts reads them, and this table shows what it returns for each case.

CaseResponserawDataKeyRows
The path names a field of the response{"results":{"records":[1]}}results.records[1]
The path names nothing in the response{"results":[1]}missing{"results":[1]}
No path, and the response has `results`{"results":[1],"other":2}none[1]
No path, and `results` is null{"results":null}none{"results":null}
No path, and the response has no `results`{"other":2}none{"other":2}
No path, and the response is a list[1,2]none[1,2]