Skip to main content
Glama

test_integration

Verify integration configurations for Coroot observability platform by testing connections with supported tools like Prometheus and Slack. Ensure proper setup for seamless monitoring and analysis.

Instructions

Test an integration configuration.

Verifies that an integration is properly configured and can connect.

Args: project_id: Project ID integration_type: Type of integration (prometheus, slack, etc)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
integration_typeYes
project_idYes

Implementation Reference

  • MCP tool registration using @mcp.tool() decorator and the handler function for the 'test_integration' tool. Includes input schema in docstring and calls the implementation.
    @mcp.tool() async def test_integration(project_id: str, integration_type: str) -> dict[str, Any]: """Test an integration configuration. Verifies that an integration is properly configured and can connect. Args: project_id: Project ID integration_type: Type of integration (prometheus, slack, etc) """ return await test_integration_impl(project_id, integration_type) # type: ignore[no-any-return]
  • Error-handling wrapper implementation that calls the CorootClient.test_integration method and formats the response.
    @handle_errors async def test_integration_impl( project_id: str, integration_type: str ) -> dict[str, Any]: """Test an integration.""" result = await get_client().test_integration(project_id, integration_type) return { "success": True, "message": f"{integration_type} integration test completed", "result": result, }
  • Core handler logic in CorootClient class: retrieves current integration config and sends POST request to Coroot API to test it.
    async def test_integration( self, project_id: str, integration_type: str ) -> dict[str, Any]: """Test an integration configuration. Args: project_id: Project ID. integration_type: Type of integration to test. Returns: Test results. """ # First get the current config integrations = await self.list_integrations(project_id) current_config = integrations.get(integration_type, {}) # Send POST with current config to test it response = await self._request( "POST", f"/api/project/{project_id}/integrations/{integration_type}", json=current_config, ) data: dict[str, Any] = response.json() return data

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