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
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| integration_type | Yes |
Implementation Reference
- src/mcp_coroot/client.py:1061-1094 (handler)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
- src/mcp_coroot/server.py:1447-1458 (handler)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]
- src/mcp_coroot/server.py:1447-1458 (registration)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]
- src/mcp_coroot/server.py:1435-1445 (helper)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, }