Skip to main content
Glama
jamesbrink

MCP Server for Coroot

delete_integration

Remove integration configurations from Coroot projects to manage monitoring connections and clean up unused integrations.

Instructions

Delete an integration configuration.

Removes an integration from the project.

Args: project_id: Project ID integration_type: Type of integration to delete

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
integration_typeYes

Implementation Reference

  • Core implementation of the delete_integration tool. Sends a DELETE request to the Coroot API endpoint `/api/project/{project_id}/integrations/{integration_type}` and handles various response formats including 204 No Content.
    async def delete_integration(
        self, project_id: str, integration_type: str
    ) -> dict[str, Any]:
        """Delete an integration configuration.
    
        Args:
            project_id: Project ID.
            integration_type: Type of integration to delete.
    
        Returns:
            Deletion status.
        """
        response = await self._request(
            "DELETE", f"/api/project/{project_id}/integrations/{integration_type}"
        )
    
        # 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
  • MCP tool handler function decorated with @mcp.tool(). This is the entry point for the 'delete_integration' tool in the FastMCP server. Delegates to the implementation wrapper.
    @mcp.tool()
    async def delete_integration(project_id: str, integration_type: str) -> dict[str, Any]:
        """Delete an integration configuration.
    
        Removes an integration from the project.
    
        Args:
            project_id: Project ID
            integration_type: Type of integration to delete
        """
        return await delete_integration_impl(project_id, integration_type)  # type: ignore[no-any-return]
  • Registration of the 'delete_integration' tool using FastMCP's @mcp.tool() decorator. The docstring provides the tool description and parameter schema inferred from type hints.
    @mcp.tool()
    async def delete_integration(project_id: str, integration_type: str) -> dict[str, Any]:
        """Delete an integration configuration.
    
        Removes an integration from the project.
    
        Args:
            project_id: Project ID
            integration_type: Type of integration to delete
        """
        return await delete_integration_impl(project_id, integration_type)  # type: ignore[no-any-return]
  • Helper implementation wrapper that calls the CorootClient.delete_integration method, formats the response, and provides standardized success/error handling.
    async def delete_integration_impl(
        project_id: str, integration_type: str
    ) -> dict[str, Any]:
        """Delete an integration."""
        result = await get_client().delete_integration(project_id, integration_type)
        return {
            "success": True,
            "message": f"{integration_type} integration 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