get_inspection_config
Retrieve the current inspection configuration for a specific application, including settings for CPU, memory, SLO availability, and latency, using project and application IDs.
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 |
|---|---|---|---|
| app_id | Yes | ||
| inspection_type | Yes | ||
| project_id | Yes |
Implementation Reference
- src/mcp_coroot/server.py:702-719 (handler)MCP tool handler decorated with @mcp.tool() that calls the implementation helper.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:686-699 (helper)Helper implementation that invokes CorootClient.get_inspection_config and formats the response.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/client.py:666-689 (helper)CorootClient method performing the HTTP API request to fetch the inspection configuration from the Coroot server.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