Skip to main content
Glama

create_application_category

Organize applications into categories using namespace/name patterns for efficient grouping and monitoring. Enable notifications for incidents and deployments, and integrate with Slack for alerts.

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
custom_patternsYes
nameYes
notify_deploymentsNo
notify_incidentsNo
project_idYes
slack_channelNo

Implementation Reference

  • The main MCP tool handler function for 'create_application_category'. It defines the tool interface, input schema via type hints and docstring, and delegates to the implementation helper.
    @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, )
  • Helper implementation that constructs the category dictionary payload and calls the CorootClient.create_application_category method.
    @handle_errors 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", }
  • Low-level CorootClient method that performs the HTTP POST request to the Coroot API endpoint /api/project/{project_id}/application_categories to create the 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)

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