Skip to main content
Glama
jamesbrink

MCP Server for Coroot

delete_project

Remove a project and all its associated data from the Coroot observability platform. This irreversible action permanently deletes project information, metrics, logs, and traces.

Instructions

Delete a project and all associated data.

WARNING: This action is irreversible and will delete all project data.

Args: project_id: Project ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes

Implementation Reference

  • MCP tool registration and handler for 'delete_project'. This is the entry point for the MCP tool, decorated with @mcp.tool() which registers it, and delegates to the implementation.
    @mcp.tool()
    async def delete_project(project_id: str) -> dict[str, Any]:
        """Delete a project and all associated data.
    
        WARNING: This action is irreversible and will delete all project data.
    
        Args:
            project_id: Project ID
        """
        return await delete_project_impl(project_id)  # type: ignore[no-any-return]
  • Core implementation of project deletion in the CorootClient. Performs the HTTP DELETE request to the Coroot API endpoint /api/project/{project_id} and handles various response formats.
    async def delete_project(self, project_id: str) -> dict[str, Any]:
        """Delete a project.
    
        Args:
            project_id: Project ID.
    
        Returns:
            Deletion status.
        """
        response = await self._request("DELETE", f"/api/project/{project_id}")
    
        # 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
  • Helper implementation function called by the MCP tool handler. Wraps the client call and formats the success response.
    @handle_errors
    async def delete_project_impl(project_id: str) -> dict[str, Any]:
        """Delete a project."""
        result = await get_client().delete_project(project_id)
        return {
            "success": True,
            "message": f"Project {project_id} deleted successfully",
            "result": result,
        }

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