Skip to main content
Glama
jamesbrink

MCP Server for Coroot

update_inspection_config

Modify inspection settings for applications in Coroot to customize monitoring of CPU, memory, SLO, and other performance metrics.

Instructions

Update inspection configuration for an application.

Updates the configuration for a specific inspection type. Configuration format depends on the inspection type.

Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) inspection_type: Type of inspection (cpu, memory, slo, etc) config: New configuration (format varies by type)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
app_idYes
inspection_typeYes
configYes

Implementation Reference

  • MCP tool handler function decorated with @mcp.tool(), which handles input parameters, calls the implementation wrapper, and returns standardized response.
    @mcp.tool()
    async def update_inspection_config(
        project_id: str,
        app_id: str,
        inspection_type: str,
        config: dict[str, Any],
    ) -> dict[str, Any]:
        """Update inspection configuration for an application.
    
        Updates the configuration for a specific inspection type.
        Configuration format depends on the inspection type.
    
        Args:
            project_id: Project ID
            app_id: Application ID (format: namespace/kind/name)
            inspection_type: Type of inspection (cpu, memory, slo, etc)
            config: New configuration (format varies by type)
        """
        return await update_inspection_config_impl(  # type: ignore[no-any-return]
            project_id, app_id, inspection_type, config
        )
  • Implementation wrapper that calls the CorootClient method and formats the success response with error handling decorator.
    @handle_errors
    async def update_inspection_config_impl(
        project_id: str,
        app_id: str,
        inspection_type: str,
        config: dict[str, Any],
    ) -> dict[str, Any]:
        """Update inspection configuration."""
        result = await get_client().update_inspection_config(
            project_id, app_id, inspection_type, config
        )
        return {
            "success": True,
            "message": f"{inspection_type} inspection configured successfully",
            "config": result,
        }
  • Core API client method that performs the HTTP POST request to Coroot API to update the inspection configuration.
    async def update_inspection_config(
        self, project_id: str, app_id: str, inspection_type: str, config: dict[str, Any]
    ) -> dict[str, Any]:
        """Update inspection configuration for an application.
    
        Args:
            project_id: Project ID.
            app_id: Application ID.
            inspection_type: Type of inspection (cpu, memory, slo, etc).
            config: New configuration.
    
        Returns:
            Updated configuration.
        """
        # URL encode the app_id since it contains slashes
        from urllib.parse import quote
    
        encoded_app_id = quote(app_id, safe="")
    
        response = await self._request(
            "POST",
            f"/api/project/{project_id}/app/{encoded_app_id}/inspection/{inspection_type}/config",
            json=config,
        )
        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