Skip to main content
Glama
jamesbrink

MCP Server for Coroot

create_application_category

Group applications by namespace/name patterns to organize monitoring and configure incident/deployment notifications in Coroot.

Instructions

Create a new application category.

Creates a category for grouping applications based on namespace/name patterns. Patterns must be space-separated and in format namespace/name (e.g., "test/* demo/*"). Each pattern must contain exactly one '/' and cannot start with '/'.

Args: project_id: Project ID name: Category name (lowercase letters, numbers, hyphens, underscores; min 3 chars) custom_patterns: Space-separated glob patterns (e.g., "test/* demo/*") notify_incidents: Whether to notify about incidents (default: True) notify_deployments: Whether to notify about deployments (default: False) slack_channel: Slack channel for notifications (optional)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
nameYes
custom_patternsYes
notify_incidentsNo
notify_deploymentsNo
slack_channelNo

Implementation Reference

  • Primary MCP tool handler: the @mcp.tool()-decorated function that defines the tool interface, input parameters, and calls the implementation. This is the exact implementation executed when the tool is called.
    @mcp.tool()
    async def create_application_category(
        project_id: str,
        name: str,
        custom_patterns: str,
        notify_incidents: bool = True,
        notify_deployments: bool = False,
        slack_channel: str | None = None,
    ) -> dict[str, Any]:
        """Create a new application category.
    
        Creates a category for grouping applications based on namespace/name patterns.
        Patterns must be space-separated and in format namespace/name
        (e.g., "test/* demo/*").
        Each pattern must contain exactly one '/' and cannot start with '/'.
    
        Args:
            project_id: Project ID
            name: Category name (lowercase letters, numbers, hyphens,
                underscores; min 3 chars)
            custom_patterns: Space-separated glob patterns (e.g., "test/* demo/*")
            notify_incidents: Whether to notify about incidents (default: True)
            notify_deployments: Whether to notify about deployments (default: False)
            slack_channel: Slack channel for notifications (optional)
        """
        return await create_application_category_impl(  # type: ignore[no-any-return]
            project_id,
            name,
            custom_patterns,
            notify_incidents,
            notify_deployments,
            slack_channel,
        )
  • Supporting implementation function that constructs the category configuration dictionary (with patterns, notifications) and calls the CorootClient method.
    async def create_application_category_impl(
        project_id: str,
        name: str,
        custom_patterns: str,
        notify_incidents: bool = True,
        notify_deployments: bool = False,
        slack_channel: str | None = None,
    ) -> dict[str, Any]:
        """Create a new application category."""
        category: dict[str, Any] = {
            "name": name,
            "builtin": False,
            "default": False,
            "builtin_patterns": "",
            "custom_patterns": custom_patterns,
            "notification_settings": {
                "incidents": {
                    "enabled": notify_incidents,
                },
                "deployments": {
                    "enabled": notify_deployments,
                },
            },
        }
    
        # Add Slack channel if specified
        if slack_channel:
            notifications = category["notification_settings"]
            notifications["incidents"]["slack"] = {
                "enabled": True,
                "channel": slack_channel,
            }
            notifications["deployments"]["slack"] = {
                "enabled": notify_deployments,
                "channel": slack_channel,
            }
    
        await get_client().create_application_category(project_id, category)
        return {
            "success": True,
            "message": f"Application category '{name}' created successfully",
        }
  • CorootClient HTTP client method that sends the POST request to Coroot API endpoint /api/project/{project_id}/application_categories to create the application category.
    async def create_application_category(
        self, project_id: str, category: dict[str, Any]
    ) -> dict[str, Any]:
        """Create a new application category.
    
        Args:
            project_id: Project ID.
            category: Category object with name and patterns.
    
        Returns:
            Created category.
        """
        response = await self._request(
            "POST", f"/api/project/{project_id}/application_categories", json=category
        )
        return self._parse_json_response(response)
  • FastMCP tool registration decorator @mcp.tool() that registers the create_application_category function as an MCP tool.
    @mcp.tool()

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