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
Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.
| Field | Type | Required | Description |
|---|---|---|---|
chartType | any | no | |
currentCode | any | no | |
dataSample | any | no | |
dataScope | any | no | |
messages | any | no | |
previewResult | any | no | |
screenshot | any | no |
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
Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.
| Field | Type | Required | Description |
|---|---|---|---|
chartType | any | no | |
code | any | no | |
dataScope | any | no | |
description | any | no | |
entityOwner | any | no | |
filters | any | no | |
layout | any | no | |
name | any | no |
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
Field names are taken from the Core handler, which reads exactly these. Types and which of them are required are not yet documented.
| Field | Type | Required | Description |
|---|---|---|---|
dataScope | any | no | |
entityOwner | any | no | |
filters | any | no |
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
| Field | Type | Required | Description |
|---|---|---|---|
widgetId | string | yes | Report 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
| Name | Type | Required | Description |
|---|---|---|---|
widgetId | string | yes | Report 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
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.
| Field | Type | Required | Description |
|---|---|---|---|
code | any | no | |
dataScope | any | no | |
widgetId | any | no |
Example
curl -X POST 'https://core.mtro.app/report-widgets/update' \
-H 'Authorization: Bearer mtro_your_api_key' \
-H 'Content-Type: application/json' \
-d '{}'