get_integration
Retrieve configuration details for a specific integration type in Coroot, including connection settings and status, to manage monitoring connections.
Instructions
Get specific integration configuration details.
Retrieves the current configuration for a specific integration type, including connection details, settings, and status.
Args: project_id: The project ID integration_type: Type of integration (prometheus, cloudwatch, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| integration_type | Yes |
Implementation Reference
- src/mcp_coroot/server.py:1947-1959 (handler)The main MCP tool handler for 'get_integration', decorated with @mcp.tool(). It delegates to the private implementation function.@mcp.tool() async def get_integration(project_id: str, integration_type: str) -> dict[str, Any]: """ Get specific integration configuration details. Retrieves the current configuration for a specific integration type, including connection details, settings, and status. Args: project_id: The project ID integration_type: Type of integration (prometheus, cloudwatch, etc.) """ return await get_integration_impl(project_id, integration_type)
- src/mcp_coroot/server.py:1934-1945 (helper)Private helper implementation that creates a CorootClient instance and calls its get_integration method to fetch the configuration, with error handling.project_id: str, integration_type: str ) -> dict[str, Any]: """Implementation for get_integration tool.""" try: client = get_client() config = await client.get_integration(project_id, integration_type) return {"success": True, "config": config} except ValueError as e: return {"success": False, "error": str(e)} except Exception as e: return {"success": False, "error": f"Unexpected error: {str(e)}"}
- src/mcp_coroot/client.py:1530-1547 (helper)CorootClient class method that performs the HTTP GET request to the Coroot API endpoint for retrieving a specific integration's configuration.async def get_integration( self, project_id: str, integration_type: str ) -> dict[str, Any]: """Get specific integration configuration. Args: project_id: The project ID integration_type: The integration type Returns: Dict containing integration configuration """ response = await self._request( "GET", f"/api/project/{project_id}/integrations/{integration_type}" ) data: dict[str, Any] = response.json() return data