Skip to main content
Glama

delete_dashboard

Removes a custom dashboard permanently from a project in the MCP Server for Coroot. Specify the project ID and dashboard ID to delete the dashboard.

Instructions

Delete a custom dashboard.

Permanently removes a dashboard from the project.

Args: project_id: Project ID dashboard_id: Dashboard ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dashboard_idYes
project_idYes

Implementation Reference

  • MCP tool handler function for 'delete_dashboard', decorated with @mcp.tool(). This is the entry point executed when the tool is called.
    @mcp.tool() async def delete_dashboard(project_id: str, dashboard_id: str) -> dict[str, Any]: """Delete a custom dashboard. Permanently removes a dashboard from the project. Args: project_id: Project ID dashboard_id: Dashboard ID """ return await delete_dashboard_impl(project_id, dashboard_id) # type: ignore[no-any-return]
  • Helper implementation that invokes the CorootClient.delete_dashboard method and handles the response formatting.
    async def delete_dashboard_impl(project_id: str, dashboard_id: str) -> dict[str, Any]: """Delete a dashboard.""" client = get_client() result = await client.delete_dashboard(project_id, dashboard_id) return { "success": True, "message": "Dashboard deleted successfully", "result": result, }
  • Core handler in CorootClient that performs the actual HTTP POST request to delete the dashboard via the Coroot API.
    async def delete_dashboard( self, project_id: str, dashboard_id: str ) -> dict[str, Any]: """Delete a dashboard. Args: project_id: Project ID. dashboard_id: Dashboard ID. Returns: Deletion status. """ request_data = {"action": "delete"} response = await self._request( "POST", f"/api/project/{project_id}/dashboards/{dashboard_id}", json=request_data, ) # Handle empty response (204 or empty body) if response.status_code == 204: return {"status": "deleted"} # Try to parse JSON response try: content = response.text.strip() if not content: # Empty response body with 200 status return {"status": "deleted"} data: dict[str, Any] = response.json() return data except Exception: # If parsing fails, assume success if status code is 2xx if 200 <= response.status_code < 300: return {"status": "deleted"} raise

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