Skip to main content
Glama
jamesbrink

MCP Server for Coroot

configure_integration

Set up or update integrations like Prometheus, AWS, Slack, and webhooks for Coroot project monitoring and alerting.

Instructions

Configure an integration for a project.

Sets up or updates an integration configuration. Each integration type has specific configuration requirements.

Integration types:

  • prometheus: Metrics data source

  • clickhouse: Long-term storage

  • aws: AWS services integration

  • slack: Slack notifications

  • teams: Microsoft Teams notifications

  • pagerduty: PagerDuty alerts

  • opsgenie: Opsgenie alerts

  • webhook: Custom webhooks

Args: project_id: Project ID integration_type: Type of integration config: Integration-specific configuration dictionary

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
integration_typeYes
configYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler and registration for 'configure_integration'. This decorated function defines the tool interface, input schema via type hints, and delegates to the implementation.
    async def configure_integration(
        project_id: str,
        integration_type: str,
        config: dict[str, Any],
    ) -> dict[str, Any]:
        """Configure an integration for a project.
    
        Sets up or updates an integration configuration. Each integration
        type has specific configuration requirements.
    
        Integration types:
        - prometheus: Metrics data source
        - clickhouse: Long-term storage
        - aws: AWS services integration
        - slack: Slack notifications
        - teams: Microsoft Teams notifications
        - pagerduty: PagerDuty alerts
        - opsgenie: Opsgenie alerts
        - webhook: Custom webhooks
    
        Args:
            project_id: Project ID
            integration_type: Type of integration
            config: Integration-specific configuration dictionary
        """
        return await configure_integration_impl(  # type: ignore[no-any-return]
            project_id, integration_type, config
        )
  • Internal helper that preprocesses webhook configurations and calls the client method, adding success response formatting.
    async def configure_integration_impl(
        project_id: str,
        integration_type: str,
        config: dict[str, Any],
    ) -> dict[str, Any]:
        """Configure an integration."""
        # Fix webhook configuration to include required templates
        if integration_type == "webhook":
            # Ensure required fields are present
            if "incidents" not in config:
                config["incidents"] = True
            if "deployments" not in config:
                config["deployments"] = False
    
            # Add default templates if missing
            if config.get("incidents") and "incident_template" not in config:
                config["incident_template"] = (
                    "Incident: {{.Title}}\n"
                    "Status: {{.Status}}\n"
                    "Applications: {{range .Applications}}{{.Id}} {{end}}\n"
                    "Link: {{.Link}}"
                )
            if config.get("deployments") and "deployment_template" not in config:
                config["deployment_template"] = (
                    "Deployment: {{.Application}}\n"
                    "Version: {{.Version}}\n"
                    "Status: {{.Status}}"
                )
    
        result = await get_client().configure_integration(
            project_id, integration_type, config
        )
        return {
            "success": True,
            "message": f"{integration_type} integration configured successfully",
            "integration": result,
        }
  • Core CorootClient method that executes the HTTP PUT request to configure integrations via the Coroot API.
    async def configure_integration(
        self,
        project_id: str,
        integration_type: str,
        config: dict[str, Any],
    ) -> dict[str, Any]:
        """Configure an integration.
    
        Args:
            project_id: Project ID.
            integration_type: Type of integration (prometheus, slack, etc.).
            config: Integration-specific configuration.
    
        Returns:
            Updated integration configuration.
        """
        response = await self._request(
            "PUT",
            f"/api/project/{project_id}/integrations/{integration_type}",
            json=config,
        )
    
        # Handle different response types
        try:
            if response.headers.get("content-type", "").startswith("application/json"):
                data: dict[str, Any] = response.json()
                return data
            else:
                # If not JSON, return success with the provided config
                return {
                    "type": integration_type,
                    "config": config,
                    "status": "configured",
                }
        except Exception:
            # If parsing fails, return minimal success response
            return {"type": integration_type, "status": "configured"}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the tool 'sets up or updates' but doesn't disclose behavioral traits: whether this is idempotent, what permissions are required, if it's destructive (e.g., overwrites existing config), error conditions, or rate limits. The mention of 'specific configuration requirements' hints at complexity but lacks actionable details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and appropriately sized. It starts with a clear purpose statement, expands with integration types in a bulleted list, and ends with parameter explanations. Every sentence adds value, though the integration type list is lengthy but necessary for clarity. It could be more front-loaded by moving the 'Args' section earlier.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 3 parameters with 0% schema coverage, no annotations, and an output schema exists (so return values are covered), the description is moderately complete. It explains parameters and integration types well but lacks behavioral context (e.g., mutation effects, error handling). For a configuration tool with nested objects ('config'), more guidance on the dictionary structure would be helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds significant value by listing all 3 parameters with brief explanations and providing a comprehensive list of integration types with their purposes (e.g., 'prometheus: Metrics data source'). This clarifies 'integration_type' options and hints at 'config' structure, though it doesn't detail the configuration dictionary format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Configure an integration for a project' and 'Sets up or updates an integration configuration.' It specifies the verb (configure/set up/update) and resource (integration configuration), but doesn't explicitly differentiate it from sibling tools like 'delete_integration' or 'get_integration' beyond the action type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., project must exist), when to use 'configure_integration' vs 'update_integration' (if such a tool existed), or how it relates to siblings like 'test_integration' or 'list_integrations'. The list of integration types implies scope but doesn't offer usage rules.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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