MCP Server Reference

Use the CloudZero MCP server to query cost data, retrieve optimization recommendations, explore Dimensions, access and send telemetry, manage organization context, evaluate business metrics, and log and manage Insights. These are the same tools that power AI Hub. In the Model Context Protocol (MCP), tools are functions that an MCP server exposes for AI clients to call.

This reference documents each tool, its parameters, and which skills use it. Skills are guided analysis workflows available through the CloudZero Plugin that combine multiple tools into structured investigations. For setup instructions, see Set Up AI Hub.

Authentication

The MCP server supports three authentication methods:

  • CloudZero account (OAuth): On first use, a browser window opens to sign in. Sessions persist across AI tool restarts. See Set Up AI Hub for setup.
  • API key: Pass an X-Api-Key header for automation, CI/CD, or clients that do not support OAuth. API key usage is metered with a daily quota. See API Key Authentication for setup.
  • OAuth client: Register a client ID and client secret for an enterprise agent platform that cannot register itself with the MCP server. Users still sign in individually, so data access controls and permission sets apply. See Connect an Agent Platform with MCP OAuth Clients for setup.

Access and permissions

The MCP server enforces the same roles and permissions as the CloudZero application.

Data access controls

Your role's data access filters apply to all cost queries. If your role restricts visibility to specific Dimensions (for example, only Team = Engineering), the MCP server returns only matching data. API key users have full access to all cost data in the organization.

The Insights tools (create_insight, update_insight, and delete_insight) and the Monitors and Incidents write tools (create_monitor, update_monitor, update_incident, and create_incident_ticket) require full data access. If your role has any data access filters, these tools return an error stating that they require full data access.

See Users and Permissions for details.

Permission sets

Some tools require specific permission sets on your role. If the required permission set is not granted, the tool returns an authorization error.

The MCP Settings permission sets control who can manage OAuth clients. They grant no access to the tools below.

ToolRequired permission setRequired scope
create_incident_ticketMonitors (Modify Incidents)monitor-evaluator:create-incident-work-item
create_insightInsights / Anomalies (Create/Modify Insights / Anomalies)insights:create-insight
create_monitorMonitors (Modify Incidents)monitor-evaluator:create-monitor
create_telemetry_streamTelemetry Stream Settings (Create/Modify Telemetry Streams via the UI)unit-cost:create-stream
delete_business_metricBusiness Metrics (Create/Modify/Remove Business Metrics)business-metrics:delete-definition
delete_insightInsights / Anomalies (Delete Insights / Anomalies)insights:delete-insight
download_costformationDimension Definition Settings (View Dimension Definitions)cost-contexts:get-definition-download-link
get_container_usageKubernetes Cluster Details (View Kubernetes Cluster Details)container:get_usage
get_costformation_versDimension Definition Settings (View Dimension Definitions)cost-contexts:get-contexts
get_incidentMonitors (View Incidents)monitor-evaluator:get-incident
get_monitorMonitors (View Incidents)monitor-evaluator:get-monitor
get_optimize_recsOptimize (View Recommendations)insights-workflow:list-recommendations
get_realized_savingsOptimize (View Recommendations)insights-workflow:get-realized-savings
get_resource_metadataResource Provider (View resource provider)resource-provider:get-resource-by-czrn
get_telemetry_dataTelemetry Stream Settings (View Telemetry Streams)unit-cost:get-records
get_telemetry_streamsTelemetry Stream Settings (View Telemetry Streams)unit-cost:streams
get_ticket_fieldsJira Ticket Settings (View Jira Work Items)ticket-integrations:get-project-ticket-type-fields
list_incidentsMonitors (View Incidents)monitor-evaluator:list-incidents
list_monitorsMonitors (View Incidents)monitor-evaluator:list-monitors
list_ticket_projectsJira Ticket Settings (View Jira Work Items)ticket-integrations:get-projects
save_business_metricBusiness Metrics (Create/Modify/Remove Business Metrics)business-metrics:create-definition, business-metrics:update-definition
send_telemetry_dataTelemetry Stream Settings (Create/Modify Telemetry Streams via the UI)unit-cost:add-records
set_generated_contextOrganization Administration (Modify Organization Settings)czca-server:set-org-context
set_org_contextOrganization Administration (Modify Organization Settings)czca-server:set-org-context
update_incidentMonitors (Modify Incidents)monitor-evaluator:update-incident-status, monitor-evaluator:create-incident-comment
update_insightInsights / Anomalies (Create/Modify Insights / Anomalies)insights:update-insight
update_monitorMonitors (Modify Incidents)monitor-evaluator:update-monitor

All other tools are available to any authenticated user.

⚠️

API key users have full access to all cost data and all tools. Role-based data access filters and permission set restrictions do not apply. Use OAuth authentication when role-based access control is required.

Usage quotas

API key calls are subject to a daily usage quota per organization. OAuth users are not metered.

ℹ️

Each organization has a default quota of 3,000 API key tool calls per UTC calendar day. The quota resets at midnight UTC.

Quota warnings

As your organization approaches the daily limit, the MCP server appends a warning to tool results at the following thresholds:

ThresholdExample warning
50%"Your organization has used 50% (1500/3000) of the daily API call quota."
75%"Your organization has used 75% (2250/3000) of the daily API call quota."
90%"Your organization has used 90% (2700/3000) of the daily API call quota."

Quota exceeded

When the daily quota is exceeded, the MCP server returns an error and no further API key tool calls succeed until the quota resets at midnight UTC.

Response size limit

The MCP server enforces a 5 MB maximum on individual tool responses. When a query produces a response above the limit, the server returns a tool error with the actual response size and guidance for narrowing the query:

"Tool '<tool_name>' produced a response of <X.X> MB, which exceeds the 5 MB limit. To recover, narrow your query: shrink date_range, add or tighten filters, reduce the limit parameter, or change group_by to a less granular dimension."

AI agents that receive this error can retry with a narrower query automatically.

Per-tool limit caps

Query-style tools also enforce a maximum value for the limit parameter. Requests that exceed the cap are rejected before the tool runs.

ToolMaximum limit
get_available_dimensions1,000
get_container_usage1,000
get_cost_data5,000
get_dimension_values1,000
list_business_metrics100
list_incidents100
get_optimize_recs1,000
get_telemetry_data5,000

Tools

CategoryToolDescription
Allocationsget_available_dimensionsList Dimensions for filtering and grouping
Allocationsget_dimension_valuesGet values for a specific Dimension
Business Metricsbusiness_metric_historyList a business metric's saved versions
Business Metricsdelete_business_metricDelete a saved business metric
Business Metricsevaluate_business_metricEvaluate a business metric over a date range
Business Metricsget_business_metricGet one business metric and the Dimensions it accepts
Business Metricslist_business_metricsList the saved business metrics visible to you
Business Metricssave_business_metricCreate a business metric, or replace a saved one
Contextget_org_contextRetrieve organization context: custom instructions and generated context
Contextget_org_context_versionsList available context versions
Contextset_generated_contextReplace the generated context that /init derives from query history
Contextset_org_contextReplace the custom instructions that agents follow
CostFormationdownload_costformationGet a download link for a CostFormation definition
CostFormationget_costformation_versList versions of a CostFormation definition
Incidentscreate_incident_ticketCreate a Jira or ServiceNow ticket for an incident
Incidentsget_incidentGet one anomaly incident in full
Incidentsget_ticket_fieldsList the fields a project's ticket type accepts, and which are required
Incidentslist_incidentsList anomaly incidents
Incidentslist_ticket_projectsList the projects and ticket types incident tickets can use
Incidentsupdate_incidentChange an incident's status or add a comment
Insightscreate_insightLog a finding as an Insight
Insightsdelete_insightDelete a manually created Insight and its comments
Insightsupdate_insightChange the status or effort of a manually created Insight
Kubernetesget_container_usageGet Kubernetes CPU and memory usage versus requests
Monitorscreate_monitorCreate a cost anomaly monitor
Monitorsget_monitorGet one monitor in full
Monitorslist_monitorsList the organization's monitors
Monitorsupdate_monitorChange a monitor
Optimizationget_optimize_recsGet cost optimization recommendations
Optimizationget_realized_savingsTrack realized savings from addressed recommendations
Queryget_cost_dataQuery cost data with filters and groupings
Queryget_recent_query_historyView recent cost queries
Referenceget_reference_infoGet reference documentation
Resourceget_resource_metadataRetrieve metadata for a single cloud resource
Telemetrycreate_telemetry_streamCreate a telemetry stream with its first data points
Telemetryget_telemetry_dataRetrieve telemetry metrics
Telemetryget_telemetry_streamsList available telemetry streams
Telemetrysend_telemetry_dataSend data points to an existing telemetry stream

Allocations

get_available_dimensions

Lists all available Dimensions for filtering or grouping cost data, including both standard CloudZero Dimensions and custom Dimensions.

Parameters

ParameterRequiredDescription
filterNoFilter Dimensions by name pattern
force_refreshNoBypass cache and fetch fresh data
include_hiddenNoInclude hidden Dimensions in results
limitNoMaximum Dimensions to return

Skills: custom-dimension-analysis, tag-coverage-analysis, understand-cloudzero-organization

get_dimension_values

Retrieves the available values for a specific Dimension, such as all account names, service types, or team values.

Parameters

ParameterRequiredDescription
date_rangeNoTime period to scope the values
dimensionYesThe Dimension to get values for
limitNoMaximum values to return
matchNoFilter values by pattern

Skills: cost-comparison, custom-dimension-analysis, tag-coverage-analysis, understand-cloudzero-organization

Business Metrics

ℹ️

The Business Metrics tools are in preview. They work only for organizations where Business Metrics is enabled; otherwise they return "Business Metrics isn't enabled for you in this organization."

A business metric is a saved formula over your billing data and telemetry streams, such as cost per booking or cost per active user. These tools list the metrics your organization has saved, read one in full, evaluate one over a date range, save a new one, and delete one. A saved metric carries its author's filters, scaling, and rollup, so evaluating it returns the same numbers as the web app.

save_business_metric and delete_business_metric require the Business Metrics permission set. The other four tools are available to any authenticated user.

The filters and group_by parameters of evaluate_business_metric take bare Dimension IDs such as CZ:Service, the same syntax as the filters of get_cost_data. A formula writes the same Dimension in brackets, as [CZ:Service]. Use get_available_dimensions to find Dimension IDs and get_dimension_values to find valid values.

business_metric_history

Lists a business metric's saved versions, newest first, including deletions. Each version is the metric as it was saved at that time.

Parameters

ParameterRequiredDescription
beforeNoReturn versions older than this one
metric_idYesID of the metric, from list_business_metrics

Response

versions holds the saved versions, each with the metric fields. A version that recorded a deletion has deleted set to true and no formula. A version whose formula your role cannot read keeps its place and its name, and has restricted set to true.

Pass next_before back as before to read older versions. An empty page means there are no older versions.

Skills: Available for direct business metric management

delete_business_metric

Deletes a saved business metric. It no longer appears in lists or in the web app, and its earlier versions stay in its history. Metrics whose formulas reference it stop evaluating until the reference is removed. Deleting a metric that is already deleted returns the existing deletion. save_business_metric cannot restore a deleted metric.

Parameters

ParameterRequiredDescription
metric_idYesID of the metric to delete

Response

Returns the metric's metric_id, the version that recorded the deletion, and the metric's name.

Skills: Available for direct business metric management

evaluate_business_metric

Evaluates a business metric over a date range and returns one value per bucket. Pass metric_id for a saved metric, or formula with grain to try formula text before saving it, never both. grain, unit, decimal_places, and source_filters apply only to formula; a saved metric carries its own.

granularity may be coarser than the metric's grain, which rolls the metric up, and never finer. A Dimension the metric cannot reach is refused, and the error names it; get_business_metric lists the Dimensions a saved metric accepts. To check formula text without running a query, use save_business_metric with dry_run.

Parameters

ParameterRequiredDescription
decimal_placesNoDecimal places for an unsaved formula
end_dateYesLast day to evaluate, inclusive
filtersNoDimension IDs mapped to the values to keep, for example {"CZ:Service": ["AmazonS3"]}
formulaConditionalUnsaved formula text to evaluate instead of metric_id. Requires grain
grainConditionalGrain the unsaved formula is defined at: daily or monthly. Required with formula
granularityNoBucket size: daily, weekly, 30days, or monthly (defaults to the metric's grain)
group_byNoDimension IDs to break the series down by
max_groupsNoMost groups to return, largest first, from 1 to 50 (default: 5)
metric_idConditionalSaved metric to evaluate, from list_business_metrics. Pass this or formula
source_filtersNoSource filters for an unsaved formula, in the format save_business_metric accepts
start_dateYesFirst day to evaluate
unitNoUnit label for an unsaved formula

Response

timestamps holds one date per bucket. Each entry in series has a group, which maps each group_by Dimension ID to that series' value, and values, which holds one decimal string or null for every timestamp, in the order of timestamps. A null value is a bucket with no value. With no group_by, the response holds one series with an empty group.

grain is the bucket size the metric was served at. unit and decimal_places come from the metric's definition. truncated is true when groups past max_groups were dropped. For an unsaved formula, sources lists the billing data and telemetry streams the formula reads; it is null for a saved metric.

A response holds at most 5,000 values, counting buckets times groups. When a long range at a fine granularity would exceed that, fewer groups come back and note says how many were kept. When the buckets alone exceed 5,000, the tool returns an error. In both cases, use a coarser granularity or a shorter range.

Example

Evaluate the saved cost per booking metric that get_business_metric returns below for the first three days of September, and break it down by region, keeping the two largest regions:

{
  "metric_id": "7c1e4a2b-3d5f-4e6a-9b8c-0d1e2f3a4b5c",
  "start_date": "2026-09-01",
  "end_date": "2026-09-03",
  "granularity": "daily",
  "group_by": ["CZ:Region"],
  "max_groups": 2
}
{
  "timestamps": ["2026-09-01", "2026-09-02", "2026-09-03"],
  "series": [
    {
      "group": { "CZ:Region": "us-east-1" },
      "values": ["0.42", "0.39", "0.41"]
    },
    {
      "group": { "CZ:Region": "eu-west-1" },
      "values": ["0.55", "0.58", null]
    }
  ],
  "grain": "daily",
  "unit": "USD",
  "decimal_places": 2,
  "truncated": true,
  "sources": null,
  "note": null
}

Cost per booking in us-east-1 held near $0.41 across the three days, and eu-west-1 ran higher. The last eu-west-1 bucket has no value. truncated is true because the metric covers more regions than the two returned, so raise max_groups to see the rest.

Skills: Available for direct business metric analysis

get_business_metric

Gets a saved business metric's current version, with the Dimensions it can be grouped and filtered by. To edit the metric, pass these fields back to save_business_metric with version as expected_version.

Parameters

ParameterRequiredDescription
metric_idYesID of the metric, from list_business_metrics

Response

Returns the current version with the metric fields, plus dimensions and note.

dimensions lists the Dimension IDs that evaluate_business_metric accepts in group_by and filters for this metric. It is null when the metric reads only billing data, where any Dimension that get_available_dimensions returns with include_hidden set applies, or when the metric cannot be evaluated. note then says which case applies.

Example

Read the saved cost per booking metric that the evaluate_business_metric example uses:

{
  "metric_id": "7c1e4a2b-3d5f-4e6a-9b8c-0d1e2f3a4b5c"
}
{
  "metric_id": "7c1e4a2b-3d5f-4e6a-9b8c-0d1e2f3a4b5c",
  "version": "2026-08-28T16:04:11.238Z",
  "name": "Cost per booking",
  "description": "Real cost per completed booking",
  "formula": "[Cost:Real Cost] / Sum([Telemetry:bookings])",
  "grain": "daily",
  "unit": "USD",
  "decimal_places": 2,
  "source_filters": [
    {
      "source": { "kind": "billing_data" },
      "condition": "[CZ:Service] = \"AmazonS3\""
    }
  ],
  "sources": [
    { "kind": "billing_data" },
    { "kind": "telemetry", "telemetry_stream": "bookings" }
  ],
  "updated_by": "[email protected]",
  "updated_via": "web",
  "deleted": false,
  "restricted": false,
  "dry_run": false,
  "dimensions": [{ "fqdid": "CZ:Region", "name": "Region" }],
  "note": null
}

The formula divides real cost by the sum of the bookings telemetry stream, and the source filter limits the cost side to Amazon S3. dimensions names the one Dimension ID this metric accepts, so evaluate_business_metric takes CZ:Region in group_by and filters and refuses any other Dimension. Pass version back as expected_version to save a change.

Skills: Available for direct business metric management

list_business_metrics

Lists the saved business metrics visible to you, ordered by metric ID, each with its formula as text.

Parameters

ParameterRequiredDescription
limitNoMost metrics to return, from 1 to 100 (default: 25)
offsetNoMetrics to skip (default: 0)

Response

metrics holds one entry per metric with the metric fields, and total_count is the number of metrics visible to you. A page can hold fewer than limit metrics. Pass next_offset back as offset to get the next page; it is null after the last page.

Metric fields

business_metric_history, get_business_metric, list_business_metrics, and save_business_metric return a metric as these fields.

FieldDescription
decimal_placesDecimal places to show, or null
deletedtrue on the version that recorded a deletion
descriptionWhat the metric measures
dry_runtrue when save_business_metric validated the definition without saving it
formulaThe formula as text
grainThe grain the formula is defined at: daily or monthly
metric_idID of the metric
nameMetric name
restrictedtrue when the formula is hidden from you
source_filtersThe filters applied per source
sourcesThe billing data and telemetry streams the formula reads directly. A metric it references reads its own
unitUnit label, or null
updated_byEmail address of the user who saved the version
updated_viaWhere the version was saved from: web, api, or mcp
versionWrite time in ISO 8601 UTC. Pass it as expected_version to save a change

Skills: Available for direct business metric management

save_business_metric

Creates a business metric, or replaces a saved metric's definition, from formula text. Every definition field is required and replaces the saved value, so a null or empty field clears it. To change one field, send the others back as get_business_metric returned them, source_filters included.

To replace a metric, pass its metric_id and the version you read as expected_version. If the metric was changed or deleted since you read it, nothing is saved and the error names the current version. This tool cannot restore a deleted metric.

With dry_run, the definition is validated as a save would validate it and nothing is stored. The errors are the same, expected_version is not checked, and the response has no version. Use it to check formula and filter syntax, and evaluate_business_metric to see a formula's values.

Parameters

ParameterRequiredDescription
decimal_placesYesDecimal places to show, or null
descriptionYesWhat the metric measures
dry_runNoValidate the definition without saving it (default: false)
expected_versionConditionalThe version you read. Required with metric_id
formulaYesFormula text, up to 4,000 characters. See Formula syntax
grainYesGrain the formula is defined at: daily or monthly
metric_idNoMetric to replace. Omit to create a metric. Requires expected_version
nameYesMetric name
source_filtersYesA condition per source, or [] for none. See Formula syntax
unitYesUnit label, or null

Formula syntax

Brackets name an input: [Cost:Real Cost], [Telemetry:<stream>], [Metric:<name>], or a Dimension as [CZ:Service] or [Dimension:<display name>]. A bare [name] works when only one input has that name. Combine terms with +, -, *, / and parentheses.

A telemetry stream needs an aggregation: Sum, Average, Min, Max, Median, or Latest, as in Sum([Telemetry:bookings]). A Dimension needs CountDistinct. A cost type is already its bucket's sum, so Sum([Cost:Real Cost]) is saved as [Cost:Real Cost].

Filter(term, condition) limits one term, as in Filter([Cost:Real Cost], [CZ:Service] = "AmazonS3"). A condition is [d] = "x", [d] != "x", In([d], ("x", "y")), or Contains([d], "x"), joined with lowercase and, or, and not.

Each entry in source_filters pairs a source with a condition written in the same condition syntax, and limits every part of the formula that reads that source to the rows the condition matches. A source is either {"kind": "billing_data"} or {"kind": "telemetry", "telemetry_stream": "<name>"}:

[
  {
    "source": { "kind": "billing_data" },
    "condition": "[CZ:Service] = \"AmazonS3\""
  }
]

Response

Returns the saved version with the metric fields. With dry_run, version is null and dry_run is true.

Skills: Available for direct business metric management

Context

Organization context is the guidance every agent reads at the start of a cost analysis session. It has two sections with different owners:

SectionWritten byWhat it holds
Custom InstructionsYou, with set_org_context or by asking the agentRules agents must follow: business rules, Dimension preferences, team structures and cost ownership, cost allocation policies
Generated ContextThe /init prompt, with set_generated_contextWhat /init derives from your recent query history: Dimension definitions, common workflows, team structures, cost allocation patterns

Each tool writes only its own section and carries the other forward unchanged. Custom Instructions take precedence when the two overlap.

Keep custom guidance across /init

The /init prompt (/plugin:cost-analyst:cloudzero:init in the Claude Code Plugin) replaces Generated Context in full on every run and never edits Custom Instructions. To add a rule that persists, such as "exclude tax and support charges by default," save it to Custom Instructions with set_org_context or ask the agent to save it for you. For setup steps, see Set Up AI Hub.

If you ran /init before context was split into two sections, your earlier generated content is stored as Custom Instructions and preserved as written. The next /init run offers to move those sections out of Custom Instructions and removes only what you confirm.

get_org_context

Retrieves your organization's context for cost analysis. The instructions field returns up to two sections: # Custom Instructions, authored by your organization with set_org_context, followed by # Generated Context, derived from query history by the /init prompt. Custom Instructions take precedence. A section is omitted when it is empty.

Parameters

ParameterRequiredDescription
versionNoSpecific context version to retrieve (defaults to the latest)

Skills: understand-cloudzero-organization, all other skills (consume cached context)

get_org_context_versions

Lists all available versions of organization context for reviewing historical configurations. Every save with set_org_context or set_generated_context creates a timestamped version. Prior versions are retained for 30 days; the current version never expires.

Parameters

None.

Skills: understand-cloudzero-organization

set_generated_context

Replaces the Generated Context section with content derived from recent query history. The /init prompt calls this tool after you review and confirm the proposed context. Custom Instructions are preserved exactly as stored, so every rule a person added survives the refresh.

Parameters

ParameterRequiredDescription
generatedYesThe complete generated context. Replaces the current Generated Context section; Custom Instructions are left unchanged

Skills: Used by the /init prompt rather than by a skill

set_org_context

Replaces the Custom Instructions section with guidance you want every agent to follow: business rules, Dimension preferences, team structures and cost ownership, cost allocation policies. The tool leaves Generated Context unchanged, and /init in turn never modifies Custom Instructions. Because the call replaces the whole section, pass the full updated text when adding to existing instructions, not just the addition.

Parameters

ParameterRequiredDescription
contextYesThe complete custom instructions. Replaces the current Custom Instructions section; Generated Context is left unchanged

Skills: understand-cloudzero-organization

CostFormation

These tools read the YAML Dimension definitions you manage with CostFormation.

download_costformation

Returns a pre-signed, temporary download link for a CostFormation Dimension definition file, along with metadata about when the definition was last updated and by whom. The link expires shortly after it is issued. Request a new link rather than retrying an expired one.

Parameters

ParameterRequiredDescription
fqnNoFully qualified name of the CostFormation definition (defaults to the default definition)
versionNoVersion identifier to download (defaults to the latest version)

Skills: Available for direct CostFormation review and export workflows

get_costformation_vers

Lists the available versions of a CostFormation Dimension definition. Returns version identifiers with human-readable creation dates, most recent first. Use this to find a version before downloading it with download_costformation.

Parameters

ParameterRequiredDescription
fqnNoFully qualified name of the CostFormation definition (defaults to the default definition)
limitNoMaximum number of versions to return (default: 10)

Skills: Available for direct CostFormation review and export workflows

Incidents

ℹ️

The Monitors and Incidents tools are in preview. They work only for organizations where Monitors is enabled; otherwise they return "Monitors aren't enabled for this organization."

These tools let an agent review the anomaly incidents that monitors raise, update their status, and create tickets for them. update_incident and create_incident_ticket require full data access.

create_incident_ticket

Creates a Jira or ServiceNow ticket for an incident and links it to the incident. Use list_ticket_projects to choose project_key and ticket_type; you can omit both only when your organization has a single project and ticket type. Calling this tool again for an incident that already has a ticket creates no second ticket and returns the existing ticket instead. If the project's ticket type has required fields, the error names them; call get_ticket_fields and pass them in fields. If the error says a field is invalid, use the id from allowed_values. Requires full data access.

Parameters

ParameterRequiredDescription
descriptionNoTicket description (1 to 10,000 characters)
fieldsNoField values keyed by field id from get_ticket_fields
incident_idYesID of the incident, from list_incidents
monitor_idYesID of the monitor the incident belongs to
project_keyNoProject key from list_ticket_projects
ticket_typeNoTicket type name from list_ticket_projects
titleNoTicket title (1 to 255 characters)

Skills: Available for direct incident management

get_incident

Retrieves one anomaly incident in full: description, cost impact, anomalous days, affected resources, and filters. affected_resources is capped; affected_resource_count is the full number.

Parameters

ParameterRequiredDescription
incident_idYesID of the incident, from list_incidents
monitor_idYesID of the monitor the incident belongs to; each item from list_incidents carries it

Skills: Available for direct incident management

get_ticket_fields

Lists the fields that a project's ticket type accepts when you create a ticket, with each field's id, name, type, and whether it is required. For ServiceNow, required is advisory. For Jira, the list is the first 50 fields on the ticket type's create screen. Pass the values you choose to create_incident_ticket in fields, keyed by field id. Jira ignores field ids that are not on the ticket type's create screen; ServiceNow writes any column you name on the table, so only use ids returned by get_ticket_fields.

Parameters

ParameterRequiredDescription
project_keyYesProject key from list_ticket_projects
ticket_typeYesTicket type name from list_ticket_projects

Field values

Field typeValue to pass in fields
selectThe id of the allowed value
multiselectA list of allowed value ids
cascading_selectParent|Child, using the values (not ids) of the parent and child options
dateYYYY-MM-DD
datetimeYYYY-MM-DD (date only)
numberAn integer
timetracking<remaining>|<spent>, for example 2d|4h
string, textText

The Labels field takes one label with no spaces. The Jira Team field takes the Atlassian team id (a UUID), which this tool cannot list.

Skills: Available for direct incident management

list_incidents

Lists anomaly incidents one page at a time, with each incident's monitor, title, cost impact, trend, status, spend status, and start date. Pass pagination.next_cursor back as cursor to get the next page, and keep the other filters and sort unchanged between pages. pagination.total_count is the count for the whole result, not the page. Use get_incident for one incident's detail.

Parameters

ParameterRequiredDescription
cursorNopagination.next_cursor from the previous page
limitNoPage size, from 1 to 100 (default: 25)
monitor_idNoOnly incidents of this monitor, from list_monitors
searchNoFree-text search over incidents
sort_keyNoField to sort by: cost_impact or start_date
sort_orderNoSort direction: asc or desc
spend_statusNoOnly incidents with this spend status: ongoing or returned_to_baseline
statusNoOnly incidents with this status: active, investigating, or resolved

Skills: Available for direct incident management

list_ticket_projects

Lists the Jira and ServiceNow projects and ticket types that incident tickets can be created in. Use a project's project_key and one of its ticket_types as the arguments of create_incident_ticket. skipped_integrations names connected integrations that could not be reached, so the list can be partial. Returns an error if no ticket integration is connected.

Parameters

None.

Skills: Available for direct incident management

update_incident

Changes an incident's status, adds a comment, or both. Pass at least one of status or comment. The status change is applied first, then the comment, and both appear on the incident's activity timeline. Requires full data access.

Resolving an incident requires resolution_reason. resolution_reason and resolution_reason_detail are valid only when status is resolved.

Parameters

ParameterRequiredDescription
commentNoComment to add (1 to 10,000 characters)
incident_idYesID of the incident
monitor_idYesID of the monitor the incident belongs to
resolution_reasonConditionalRequired when status is resolved. See Resolution reasons
resolution_reason_detailNoNote on the resolution (1 to 255 characters)
statusNoNew status: active, investigating, or resolved

Resolution reasons

ValueDescription
intentionalThe spend change was intended.
not_an_anomalyThe detected change was not an anomaly.
remediatedThe cause was fixed.
self_resolvedThe spend returned to normal without action.

Skills: Available for direct incident management

Insights

These tools let an agent log a finding as an Insight and track it as your team works on it. They act on the same Insights you create from Explorer, and the results appear on the Insights tab in Optimize. All three tools require full data access.

update_insight and delete_insight work only on Insights that a person created, through Explorer or with create_insight. They reject Insights that CloudZero generates automatically, such as cost anomalies and recommendations.

create_insight

Creates an Insight with the same fields and validation as the Create Insight form in Explorer. CloudZero removes HTML from the title and description, and accepts a link only when it is an https:// URL on a cloudzero.com domain, such as a link back to an Explorer query. Returns the new Insight, including its ID.

Parameters

ParameterRequiredDescription
categoryYesInsight category: Trend, Optimization, or Other
cost_impactNoEstimated cost impact in your organization's currency
descriptionYesWhat you found and why it matters
effortNoEstimated effort to address: not_set, low, medium, or high
linkNohttps:// link on a cloudzero.com domain that points to supporting detail
statusNoInitial status (default: new). See Insight status values
titleYesShort name for the finding

Skills: Available for direct Insight logging

delete_insight

Permanently deletes an Insight and all of its comments. A deleted Insight cannot be restored. To close an Insight and keep its history, set its status to addressed or ignored with update_insight instead. Returns the deleted Insight's ID and the number of comments deleted.

Parameters

ParameterRequiredDescription
insight_idYesID of the Insight to delete

Skills: Available for direct Insight management

update_insight

Changes the status or effort of a manually created Insight. Pass at least one of status or effort; fields you leave out keep their current values. Returns the updated Insight.

Parameters

ParameterRequiredDescription
effortNoNew effort estimate: not_set, low, medium, or high
insight_idYesID of the Insight to update
statusNoNew status. See Insight status values

Insight status values

ValueDescription
addressedThe Insight has been acted on (closes the Insight).
ignoredThe Insight has been reviewed and dismissed (closes the Insight).
in_progressSomeone is actively working on the Insight.
newThe Insight has been logged but no action has been taken.
on_holdWork on the Insight is paused.

Skills: Available for direct Insight management

Kubernetes

get_container_usage

Reports how much CPU and memory Kubernetes workloads actually use versus what they request, for rightsizing and container-efficiency analysis. Data comes from the CloudZero Agent for Kubernetes, so it covers only clusters running the agent. Cost is not included here; use the cost tools for spend and pair the two to size the savings available from rightsizing.

Parameters

ParameterRequiredDescription
date_rangeNoTime period to query (defaults to the last 30 days)
filtersNoFilter criteria as a dict mapping a dimension to the values to include, for example {"k8s_workload": ["checkout-api"]}
limitNoMaximum entities to return, from 1 to 1000 (default: 100)
partition_byYesKubernetes entity to key the results by

Partition values

ValueDescription
k8s_clusterKey results by cluster
k8s_namespaceKey results by namespace
k8s_workloadKey results by workload

Valid filters dimensions are k8s_cluster, k8s_namespace, k8s_workload, cloud_account_id, cloud_provider, and cloud_region.

Response

Each entity reports p95_used (the 95th-percentile amount used over the date range, which absorbs short spikes), requested (the amount reserved), and efficiency (p95_used / requested). Efficiency well under 1.0 means the workload reserves far more than it uses and is a rightsizing candidate; near 1.0 means it is sized about right; above 1.0 means it is using more than it requested and risks CPU throttling or OOM kills. Efficiency is capped at 2.0, so that value means "at least twice its request" rather than an exact ratio. Any of the three values can be null, most often for workloads that set no resource requests.

CPU is reported in cores and memory in GiB. The response echoes cpu_unit, memory_unit, and the effective date_range used.

The response holds at most limit entities, chosen by the most CPU requested, so the largest reservations come first. total_entities reports how many entities matched the query, and truncated is true when that count is higher than the number returned. Organization-wide k8s_workload queries can match tens of thousands of workloads. To see past the largest ones, narrow the query with a k8s_cluster or k8s_namespace filter rather than raising limit.

Skills: Available for direct Kubernetes rightsizing lookups

Monitors

Monitors watch the spend that matches a set of filters and raise incidents when they detect an anomaly. These tools list, read, create, and change monitors. They are in preview and work only for organizations where Monitors is enabled; otherwise they return "Monitors aren't enabled for this organization." create_monitor and update_monitor require full data access.

Monitor filters and grouping use Dimension IDs such as CZ:Service, the same syntax as the filters of get_cost_data. Use get_available_dimensions to find Dimension IDs and get_dimension_values to find valid values.

create_monitor

Creates a monitor that watches the spend matching filter_set and raises incidents on anomalies. An empty filter_set watches all spend. CloudZero checks that the filters match cost data, so a monitor with no matching spend can be rejected. If another monitor already has the same filter_set, group_by, threshold, and cost_type, the tool creates nothing and returns an error and the existing monitor's ID. The creation appears on the monitor's activity timeline. Returns the new monitor, including its ID. Requires full data access.

Parameters

ParameterRequiredDescription
cost_typeNoCost type to monitor (default: REAL_COST). See Monitor cost types
descriptionNoDescription (up to 1,000 characters)
filter_setNoFilters as a dict mapping a Dimension ID to the values to include, for example {"CZ:Service": ["AmazonS3"]}. Prefix a key with ! to exclude, & for a case-insensitive partial match, or both
group_byNoAt most one Dimension ID to group by, for example ["CZ:Service"]. Omit for no grouping
is_enabledNoWhether the monitor runs (default: true)
monitor_nameYesName for the monitor (1 to 255 characters)
thresholdNoLimits which detected anomalies are surfaced as incidents. See Threshold

Monitor cost types

ValueDescription
AMORTIZED_COSTUpfront payments spread over term
BILLED_COSTAs invoiced
CUSTOM_COSTA cost calculation defined for your organization
DISCOUNTED_AMORTIZED_COSTAmortized with discounts
DISCOUNTED_COSTDiscount amounts applied
INVOICED_AMORTIZED_COSTRecurring commitment charges amortized; upfront charges remain separate line items
ON_DEMAND_COSTOn-demand pricing
REAL_COSTAfter all discounts (default)

Threshold

FieldDescription
min_cost_impactMinimum cost impact for an anomaly to be surfaced (0 or more)
operatorAND or OR. Required when both min_cost_impact and percentage are set, and invalid otherwise
percentageMinimum percentage deviation for an anomaly to be surfaced (greater than 0)

Skills: Available for direct monitor management

get_monitor

Retrieves one monitor in full: description, filter_set, group_by, cost type, and threshold. filter_set and group_by use Dimension IDs.

Parameters

ParameterRequiredDescription
monitor_idYesID of the monitor, from list_monitors

Skills: Available for direct monitor management

list_monitors

Lists every monitor in your organization in one response, with no paging. Each monitor includes its name, enabled state, cost type, group_by Dimensions, and open incident count. Use get_monitor for a monitor's filters, threshold, and description.

Parameters

None.

Skills: Available for direct monitor management

update_monitor

Changes a monitor. Fields you leave out keep their current values; pass at least one change. filter_set and group_by replace the stored values. A change that would give the monitor the same filter_set, group_by, threshold, and cost_type as another monitor returns an error and the existing monitor's ID. The change appears on the monitor's activity timeline. Returns the updated monitor. Requires full data access.

System monitors accept only threshold and is_enabled changes.

Parameters

ParameterRequiredDescription
clear_descriptionNoSet to true to remove the description. Do not combine with description
cost_typeNoNew cost type. See Monitor cost types
descriptionNoNew description (up to 1,000 characters)
filter_setNoReplaces all filters; {} removes every filter so the monitor watches all spend. Same syntax as in create_monitor
group_byNoReplaces grouping with one Dimension ID, or [] to remove grouping
is_enabledNoEnable or disable the monitor
monitor_idYesID of the monitor to update, from list_monitors
monitor_nameNoNew name (1 to 255 characters)
thresholdNoReplaces the threshold; an empty object removes it. See Threshold

Skills: Available for direct monitor management

Optimization

get_optimize_recs

Retrieves cost optimization recommendations from CloudZero, including rightsizing, Reserved Instance, and Savings Plan opportunities.

Parameters

ParameterRequiredDescription
limitNoMaximum recommendations to return
offsetNoPagination offset
sort_keyNoField to sort results by
sort_orderNoSort direction: asc or desc
statusNoFilter by recommendation status

Status values

ValueDescription
addressedCompleted
ignoredDismissed
in_progressBeing implemented
not_startedNot yet acted upon

Skills: service-cost-deep-dive

get_realized_savings

Retrieves realized savings from addressed Optimize recommendations over a time period, with optional breakdowns by Dimension.

Parameters

ParameterRequiredDescription
end_dateNoEnd date in YYYY-MM-DD format (defaults to today)
filtersNoFilter criteria as a JSON object (for example, {"service": ["EC2"]})
max_partitionsNoMaximum number of partitions to return (default: 10)
partition_byNoDimension to partition results by (for example, service, account, region)
start_dateNoStart date in YYYY-MM-DD format (defaults to 30 days ago)

Skills: Available for direct savings analysis and reporting

Query

get_cost_data

Queries cost data from CloudZero with support for grouping, filtering, and time-based analysis. This is the primary tool for retrieving cost information.

Parameters

ParameterRequiredDescription
cost_typeNoType of cost metric (default: real_cost)
date_rangeNoTime period to query (defaults to the last 30 days)
filtersNoFilter criteria to narrow results
granularityNoTime granularity: hourly, daily, weekly, 30days, monthly
group_byNoDimensions to group results by (up to 3)
limitNoMaximum results to return (default: 50)

Response

Each result row includes projected_row_count, the number of underlying cost records aggregated into that row. This is useful for diagnosing Dimension cardinality and allocation complexity. The value is null for hourly granularity.

Skills: cost-anomaly-detection, cost-comparison, cost-spike-investigation, cost-trend-analysis, custom-dimension-analysis, service-cost-deep-dive, tag-coverage-analysis, top-cost-drivers

get_recent_query_history

Returns an analysis of your organization's cost query patterns over the last 30 days, including the most frequently used queries (overall and over the last 7 days), the most frequently used Dimensions, and total query counts.

Parameters

None.

Skills: All skills (for context)

Reference

get_reference_info

Retrieves reference documentation about CloudZero concepts, workflows, and best practices.

Parameters

ParameterRequiredDescription
reference_typeYesType of reference to retrieve

Reference types

ValueDescription
cost_analyst_instructionsGeneral cost analyst guidance
cost_analysis_workflowBest practices for cost analysis
cost_typesAvailable cost metrics
custom_dimensions_workflowWorking with custom Dimensions
dimensionsStandard Dimensions
filtering_workflowHow to filter cost data

Skills: understand-cloudzero-organization, all skills (for reference lookups)

Resource

get_resource_metadata

Retrieves metadata for a single cloud resource by its CloudZero Resource Name (CZRN), including provider service, resource type, lifecycle state, tags, and relationships.

Parameters

ParameterRequiredDescription
czrnYesThe CloudZero Resource Name (CZRN) identifying the resource

Skills: Available for direct resource metadata lookups

Telemetry

create_telemetry_stream

Creates a telemetry stream and writes its first data points in the same call. Add later data points with send_telemetry_data.

If a stream with that name already exists, the tool returns an error. If two creates of the same new name overlap, both succeed only when they send data of the same shape, and then the losing call's data merges into the stream the other created. If stream type, target Dimensions, or granularity differ, the losing call returns an error.

Metric streams created by this tool are daily, and passing any other granularity for a metric stream returns an error. Create a monthly metric stream in Settings > Telemetry Streams. Every data point in the batch must use the same set of target Dimensions. For an allocation stream, granularity sets the stream's time bucket. Granularity is one value per call, not a per-record field.

The result returns the stream name and count, the number of data points accepted. If CloudZero accepts fewer data points than were sent, the tool returns an error. Ingestion into the store that get_telemetry_data reads runs hourly. A query immediately after a successful create returns no rows until that ingestion runs.

For stream status and where the data appears, see Send unit cost and allocation data.

Parameters

ParameterRequiredDescription
data_pointsYesAt least 1 data point that seeds the stream. See Data point fields
granularityNoFor allocation streams, hourly, daily, or monthly (default: daily). Metric streams accept only daily
stream_nameYesName of the stream to create
stream_typeYesallocation for an Allocation Stream, or metric for a Unit Cost Metric

Data point fields

FieldDescription
usage_dateRequired date and time the data point applies to
element_nameRequired for allocation streams, and must be left out for metric streams
targetMap of fully qualified Dimension ID (FQDID) keys to values (default: empty)
valueRequired number

Skills: Available for direct telemetry stream creation

get_telemetry_data

Retrieves telemetry metrics from configured telemetry streams for correlating costs with operational metrics.

Parameters

ParameterRequiredDescription
date_rangeNoTime period for telemetry data (defaults to the last 30 days)
filtersNoFilter criteria to narrow results; only Dimensions in the stream's keys can be used as filters
granularityNoTime granularity: hourly, daily, weekly, 30days, monthly; defaults to the stream's native granularity and cannot be finer than the stream's natural grain
group_byNoDimensions to group results by; only target Dimensions in the stream's keys are valid
limitNoMaximum results to return (default: 50)
stream_nameYesThe name of the telemetry stream to query

Skills: cost-trend-analysis, service-cost-deep-dive

get_telemetry_streams

Lists all available telemetry streams configured in your CloudZero organization.

Parameters

None.

Skills: cost-trend-analysis, service-cost-deep-dive

send_telemetry_data

Sends allocation or metric data points to a telemetry stream that already exists. The tool reads the stream type from that stream. Create the stream first with create_telemetry_stream.

A data point with a value of zero is rejected under replace and replace_period, and accepted under sum.

The result returns count, the number of data points accepted. If CloudZero accepts fewer data points than were sent, the tool returns an error. Ingestion into the store that get_telemetry_data reads runs hourly. A query immediately after a successful send returns no rows until that ingestion runs.

Parameters

ParameterRequiredDescription
data_pointsYesAt least 1 data point to send, with target keys that exactly match the stream's keys. See Data point fields
operationNosum, replace, or replace_period (default: replace). See Operation values
stream_nameYesName of the existing stream

Operation values

ValueDescription
sumAdd submitted values to matching data points
replaceOverwrite matching data points with the submitted values
replace_periodReplace every data point on each usage date in the batch, remove a target the batch omits for that date, and leave dates not in the batch unchanged

Skills: Available for direct telemetry uploads

Parameter reference

Cost types

The cost_type parameter accepts the following values:

ValueDescription
amortized_costUpfront payments spread over term
billed_costAs invoiced
custom_costA cost calculation defined for your organization, available when CloudZero has configured one for you
discounted_amortized_costAmortized with discounts
discounted_costDiscount amounts applied
invoiced_amortized_costRecurring commitment charges amortized; upfront charges remain separate line items
on_demand_costOn-demand pricing
real_costAfter all discounts (default)
usage_amountUsage quantities (for example, GB-hours or compute-hours) instead of cost

Granularity options

The granularity parameter accepts:

ValueDescription
30daysFixed 30-day period breakdown
dailyDay-by-day breakdown
hourlyHour-by-hour breakdown
monthlyMonth-by-month breakdown
weeklyWeek-by-week breakdown

Omit the granularity parameter to return the total for the period with no time breakdown.

ℹ️

Have questions or feedback? Reach out to your account manager.


Did this page help you?