Skip to main content
Glama

get_panel_data

Retrieve metrics and time series data for a specific dashboard panel in Coroot to analyze application performance and infrastructure monitoring.

Instructions

Get data for a specific dashboard panel.

Retrieves the data that powers a specific panel in a custom dashboard, including metrics, time series data, or aggregated values.

Args: project_id: The project ID dashboard_id: The dashboard ID panel_id: The panel ID within the dashboard from_time: Optional start time (ISO format or relative like '-1h') to_time: Optional end time (ISO format or 'now')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
dashboard_idYes
panel_idYes
from_timeNo
to_timeNo

Implementation Reference

  • MCP tool handler function for 'get_panel_data'. This is the entry point registered with FastMCP that handles tool calls and delegates to the implementation.
    @mcp.tool() async def get_panel_data( project_id: str, dashboard_id: str, panel_id: str, from_time: str | None = None, to_time: str | None = None, ) -> dict[str, Any]: """ Get data for a specific dashboard panel. Retrieves the data that powers a specific panel in a custom dashboard, including metrics, time series data, or aggregated values. Args: project_id: The project ID dashboard_id: The dashboard ID panel_id: The panel ID within the dashboard from_time: Optional start time (ISO format or relative like '-1h') to_time: Optional end time (ISO format or 'now') """ return await get_panel_data_impl( project_id, dashboard_id, panel_id, from_time, to_time )
  • Core handler in CorootClient that makes the actual HTTP request to the Coroot API endpoint /api/project/{project_id}/panel/data to fetch the panel data.
    async def get_panel_data( self, project_id: str, dashboard_id: str, panel_id: str, params: dict[str, Any] | None = None, ) -> dict[str, Any]: """Get data for a specific dashboard panel. Args: project_id: The project ID dashboard_id: The dashboard ID panel_id: The panel ID params: Optional query parameters (time range, etc.) Returns: Dict containing panel data """ query_params = params or {} query_params.update({"dashboard": dashboard_id, "panel": panel_id}) response = await self._request( "GET", f"/api/project/{project_id}/panel/data", params=query_params ) data: dict[str, Any] = response.json() return data
  • Helper implementation function in the MCP server that wraps the client call with error handling specific to the tool.
    async def get_panel_data_impl( project_id: str, dashboard_id: str, panel_id: str, from_time: str | None = None, to_time: str | None = None, ) -> dict[str, Any]: """Implementation for get_panel_data tool.""" try: client = get_client() params = {} if from_time: params["from"] = from_time if to_time: params["to"] = to_time data = await client.get_panel_data(project_id, dashboard_id, panel_id, params) return {"success": True, "data": data} except ValueError as e: return {"success": False, "error": str(e)} except Exception as e: return {"success": False, "error": f"Unexpected error: {str(e)}"}
  • FastMCP tool registration decorator that registers the get_panel_data handler with name 'get_panel_data'.
    @mcp.tool()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jamesbrink/mcp-coroot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server