Skip to content

Total Cost Optimization log policies

Manage Coralogix Total Cost Optimization (TCO) Optimizer log policies directly from your AI agent. The Model Context Protocol (MCP) server provides a unified tool to create, retrieve, update, and delete log policies, and to generate infrastructure-as-code definitions.

Tool

Use manage_tco_log_policies for all log policy operations.
Action valueDescription
createCreate a log policy.
getRetrieve a specific log policy by ID.
listList log policies with an optional case-insensitive name filter.
updateUpdate an existing policy.
deleteDelete a log policy by ID.
generate_openapiGenerate the OpenAPI JSON payload for an atomic overwrite request.
generate_kubernetesGenerate a Kubernetes Operator YAML manifest for the full log policy list.
generate_terraformGenerate Terraform configuration for the full log policy list.

Example prompts

Create a policy

Create a Total Cost Optimization log policy named low-priority-backend-errors.
Enable it, set priority low, match severities error and critical, match
applications that start with mcp-beta, and match subsystems that include backend.

Export 1 policy

Generate Terraform configuration for the Total Cost Optimization log policy named
low-priority-backend-errors. Do not apply it.

Export the full policy list

Generate Terraform configuration and Kubernetes YAML for the full current Total Cost
Optimization log policy list. This is inspect-only; do not apply the output.

Important behaviors

  • Generated Terraform and Kubernetes are atomic overwrite resources. Applying generated output replaces the complete backend log policy set.
  • Prefer full-list generation. The tool allows single-policy generation, but returns a warning because the generated resource represents the full list.
  • Priority and severity values must be valid. The tool rejects invalid values before it sends the request.
  • Archive retention output needs a resolvable retention name. Provide it when generating Kubernetes YAML for archive-retention policies.