---
name: mprove-query-data
description: Query chart, dashboard, report or build a new one. Answer question using data.
---

# mprove-query-data

Use `get-state` tool to see if project has valid Mprove models.

You can use `get-model` to see available fields.

You can search files by modelId to understand model main source and imported sources.

You can build a new model if current models cannot answer user question.

`get-state` also provides reports, dashboards and charts.

You can search files by reportId and dashboardId to understand it.

If existing reports and dashboard cannot answer user question - you create a new report or dashboard.

Instead of searching for existing charts by chartId - you can always create a new mprove chart file.

If user asks for question that can be answered using metric (time dimension + measure) - provide a report as an answer (existing report or create a new one).

If user asks for dashboard - provide dashboard (existing dashboard or create a new one).

If user asks for non-time based data - provide chart.

If you create or modify files - run `mprove sync --env <envId>` to validate and rebuild Mprove state.

Fix errors (if any) and call `run` tool.

