update_ai_config
Configure AI provider settings to enhance root cause analysis in the Coroot observability platform by updating API keys and model selections.
Instructions
Update AI provider configuration.
Configures AI provider settings for enhanced root cause analysis.
Args: config: AI provider settings (API keys, model selection, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes |
Implementation Reference
- src/mcp_coroot/client.py:1473-1484 (handler)Core handler implementation in CorootClient: performs HTTP POST to /api/ai with the provided config and returns the updated configuration.async def update_ai_config(self, config: dict[str, Any]) -> dict[str, Any]: """Update AI provider configuration. Args: config: AI provider settings. Returns: Updated AI configuration. """ response = await self._request("POST", "/api/ai", json=config) data: dict[str, Any] = response.json() return data
- src/mcp_coroot/server.py:1866-1876 (registration)MCP tool registration: @mcp.tool() decorator registers the update_ai_config tool, with input schema dict[str, Any] and description.@mcp.tool() async def update_ai_config(config: dict[str, Any]) -> dict[str, Any]: """Update AI provider configuration. Configures AI provider settings for enhanced root cause analysis. Args: config: AI provider settings (API keys, model selection, etc.) """ return await update_ai_config_impl(config) # type: ignore[no-any-return]
- src/mcp_coroot/server.py:1855-1864 (helper)Helper implementation: wraps client call, adds success message and error handling via @handle_errors decorator.async def update_ai_config_impl(config: dict[str, Any]) -> dict[str, Any]: """Update AI configuration.""" client = get_client() result = await client.update_ai_config(config) return { "success": True, "message": "AI configuration updated successfully", "config": result, }