get_inspection_config
Retrieve configuration for application performance inspections like CPU, memory, or SLO monitoring to analyze and manage observability settings.
Instructions
Get inspection configuration for an application.
Retrieves the current configuration for a specific inspection type (e.g., cpu, memory, slo_availability, slo_latency) for an application.
Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) inspection_type: Type of inspection (cpu, memory, slo, etc)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| app_id | Yes | ||
| inspection_type | Yes |
Implementation Reference
- src/mcp_coroot/server.py:701-719 (handler)MCP tool handler function that executes the get_inspection_config tool by calling the internal implementation.@mcp.tool() async def get_inspection_config( project_id: str, app_id: str, inspection_type: str, ) -> dict[str, Any]: """Get inspection configuration for an application. Retrieves the current configuration for a specific inspection type (e.g., cpu, memory, slo_availability, slo_latency) for an application. Args: project_id: Project ID app_id: Application ID (format: namespace/kind/name) inspection_type: Type of inspection (cpu, memory, slo, etc) """ return await get_inspection_config_impl( # type: ignore[no-any-return] project_id, app_id, inspection_type )
- src/mcp_coroot/server.py:685-698 (handler)Internal implementation of the tool handler that uses the CorootClient to fetch the inspection configuration.@handle_errors async def get_inspection_config_impl( project_id: str, app_id: str, inspection_type: str, ) -> dict[str, Any]: """Get inspection configuration.""" config = await get_client().get_inspection_config( project_id, app_id, inspection_type ) return { "success": True, "config": config, }
- src/mcp_coroot/server.py:701-701 (registration)FastMCP tool registration decorator for the get_inspection_config tool.@mcp.tool()
- src/mcp_coroot/client.py:666-689 (helper)CorootClient helper method that makes the actual API request to retrieve the inspection configuration.async def get_inspection_config( self, project_id: str, app_id: str, inspection_type: str ) -> dict[str, Any]: """Get inspection configuration for an application. Args: project_id: Project ID. app_id: Application ID. inspection_type: Type of inspection (cpu, memory, slo, etc). Returns: Inspection 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( "GET", f"/api/project/{project_id}/app/{encoded_app_id}/inspection/{inspection_type}/config", ) data: dict[str, Any] = response.json() return data