Skip to main content
Glama
jamesbrink

MCP Server for Coroot

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
NameRequiredDescriptionDefault
project_idYes
dashboardYes

Implementation Reference

  • 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]
  • 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,
        }
  • 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)

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