Skip to main content

Report widgets

Configurable dashboard widgets and their data.

7 endpoints. Every request needs an Authorization: Bearer mtro_... header, and responses follow the envelope described in Errors and conventions.

POST /report-widgets/ai-assist​

Ask Core's report widget assistant to help generate widget logic.

Required scope: any valid API key for the entity.
MCP tool: report_widgets_ai_assist

Request body

note

Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.

FieldTypeRequiredDescription
chartTypeanyno
currentCodeanyno
dataSampleanyno
dataScopeanyno
messagesanyno
previewResultanyno
screenshotanyno

Example

curl -X POST 'https://core.mtro.app/report-widgets/ai-assist' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{}'

POST /report-widgets/create​

Create a report widget. This writes dashboard configuration and should require owner confirmation when used by an agent.

Required scope: any valid API key for the entity.
MCP tool: report_widgets_create

Request body

note

Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.

FieldTypeRequiredDescription
chartTypeanyno
codeanyno
dataScopeanyno
descriptionanyno
entityOwneranyno
filtersanyno
layoutanyno
nameanyno

Example

curl -X POST 'https://core.mtro.app/report-widgets/create' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{}'

POST /report-widgets/data​

Run a report widget and return its data.

Required scope: any valid API key for the entity.
MCP tool: report_widgets_data

Request body

note

Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.

FieldTypeRequiredDescription
dataScopeanyno
entityOwneranyno
filtersanyno

Example

curl -X POST 'https://core.mtro.app/report-widgets/data' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{}'

POST /report-widgets/delete​

Delete a report widget. This is destructive and should require owner confirmation when used by an agent.

Required scope: any valid API key for the entity.
MCP tool: report_widgets_delete

Request body

FieldTypeRequiredDescription
widgetIdstringyesReport widget ID.

Example

curl -X POST 'https://core.mtro.app/report-widgets/delete' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{"widgetId":"<widgetId>"}'

GET /report-widgets/get/{widgetId}​

Get a dashboard report widget by ID.

Required scope: any valid API key for the entity.
MCP tool: report_widgets_get

Path parameters

NameTypeRequiredDescription
widgetIdstringyesReport widget ID.

Example

curl -X GET 'https://core.mtro.app/report-widgets/get/<widgetId>' \
-H 'Authorization: Bearer mtro_your_api_key'

GET /report-widgets/get/all​

List dashboard report widgets.

Required scope: any valid API key for the entity.
MCP tool: report_widgets_list

Example

curl -X GET 'https://core.mtro.app/report-widgets/get/all' \
-H 'Authorization: Bearer mtro_your_api_key'

POST /report-widgets/update​

Update a report widget. This writes dashboard configuration and should require owner confirmation when used by an agent.

Required scope: any valid API key for the entity.
MCP tool: report_widgets_update

Request body

note

Field names are taken from the Core handler. It also passes the body on to internal helpers, so it may accept fields beyond those listed here. Types are not yet documented.

FieldTypeRequiredDescription
codeanyno
dataScopeanyno
widgetIdanyno

Example

curl -X POST 'https://core.mtro.app/report-widgets/update' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{}'