create_dashboard
Build custom monitoring dashboards with tailored panels and queries to track specific infrastructure metrics in your Coroot project.
Instructions
Create a new custom dashboard.
Creates a dashboard with custom panels and queries for monitoring specific aspects of your infrastructure.
Args: project_id: Project ID dashboard: Dashboard configuration with panels and layout
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| dashboard | Yes |
Implementation Reference
- src/mcp_coroot/server.py:1309-1324 (registration)MCP tool registration for 'create_dashboard'. The @mcp.tool() decorator registers this function as the MCP tool with the given name, input schema from type hints and docstring, and delegates execution to the impl.@mcp.tool() async def create_dashboard( project_id: str, dashboard: dict[str, Any] ) -> dict[str, Any]: """Create a new custom dashboard. Creates a dashboard with custom panels and queries for monitoring specific aspects of your infrastructure. Args: project_id: Project ID dashboard: Dashboard configuration with panels and layout """ return await create_dashboard_impl(project_id, dashboard) # type: ignore[no-any-return]
- src/mcp_coroot/server.py:1297-1308 (handler)Implementation wrapper with error handling that invokes the CorootClient.create_dashboard method and formats the success response.@handle_errors async def create_dashboard_impl( project_id: str, dashboard: dict[str, Any] ) -> dict[str, Any]: """Create a new dashboard.""" result = await get_client().create_dashboard(project_id, dashboard) return { "success": True, "message": "Dashboard created successfully", "dashboard": result, }
- src/mcp_coroot/client.py:978-995 (handler)Core handler implementation in CorootClient class. Makes authenticated POST request to Coroot API endpoint /api/project/{project_id}/dashboards to create the dashboard and parses the JSON response.async def create_dashboard( self, project_id: str, dashboard: dict[str, Any] ) -> dict[str, Any]: """Create a new custom dashboard. Args: project_id: Project ID. dashboard: Dashboard configuration. Returns: Created dashboard. """ response = await self._request( "POST", f"/api/project/{project_id}/dashboards", json=dashboard, ) return self._parse_json_response(response)