Tools Reference

Complete reference for every read-only tool in the DigiUsher MCP Server

The DigiUsher MCP Server has 45 read-only tools in 12 domains. Every tool needs an authentication, and most tools need an organization_id. To find your organizations, call list_organizations first.

Every tool calls the DigiUsher API for you, so the permissions of your DigiUsher account apply. A tool with a body parameter takes a JSON object. A separate Body fields table gives the fields of that object.

Dates are YYYY-MM-DD strings. Wherever a tool takes start_date and end_date, start_date must be on or before end_date.

Organizations & Users

list_organizations

Entry-point tool for organization-scoped workflows. Returns organizations the authenticated user can access. Call this first when organization_id is unknown.

ParameterTypeRequiredDefaultDescription
(none)No parameters needed

Example prompt: "What organizations do I have access to in DigiUsher?"


get_current_user

Returns the profile of the authenticated DigiUsher user. Use it to identify the caller, and to make sure that the account context is correct, before an operation on an organization.

ParameterTypeRequiredDefaultDescription
(none)No parameters needed

Example prompt: "Who am I in DigiUsher?"


Data Sources

list_data_sources

Lists cloud account and billing data sources for an organization. Useful for mapping data_source_id values in expense and recommendation results.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID

Example prompt: "What cloud accounts are connected to my organization?"


get_data_source

Get detailed information for a single data source by ID, including configuration and status. Use list_data_sources first to find the data_source_id.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
data_source_idUUIDYesData source ID

Example prompt: "Show me the details and status of data source abc-123."


Expenses

DigiUsher recommends this workflow for the expense tools:

  1. Call get_expense_dimension_catalog to find the available dimensions.
  2. Call query_expense_dimension_values to get the valid filter values of a dimension.
  3. Call query_expense_data to run the expense query.
  4. Call get_expense_dimension_lookups to translate the IDs in the results into names.

get_expense_dimension_catalog

Lists available expense dimensions and their capabilities for filtering or grouping.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID

Example prompt: "What dimensions can I use to break down my cloud costs?"


query_expense_dimension_values

Returns the valid values of one expense dimension. It works for standard dimensions and for tags. In a query_expense_data filter, use only these values. Another value gives an error.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesQuery parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
dimensionobjectYesDimension specification. The field dimension_type gives its shape, as in the table that follows
searchstringNoSearch term to filter values (max 100 characters)
limitintegerNo100Maximum number of values to return (1–1,000,000)

The dimension object takes one of four shapes:

dimension_typeOther fieldsDescription
standardnameA standard dimension name, for example {"dimension_type": "standard", "name": "service_name"}
tagtag_type, keyCloud tags. tag_type is keys to list the tag keys, and you then omit key. tag_type is values to list the values of one tag, and key is then necessary
allocated_tagtag_type, keyAllocated tags (JSON paths such as k8s.namespace). Same tag_type/key rules as tag
derivedkeyA derived allocation dimension identified by its slug, as defined in Cost Allocation

Standard dimension names: service_name, service_category, service_subcategory, resource_type, resource_id, resource_group, region_id, network_from, network_to, data_source_id, provider, publisher, charge_category, pricing_category, license_model, sku_name, invoice_id, invoice_issuer, commitment_discount_type, commitment_discount_category, commitment_discount_id, commitment_discount_status, consumed_unit, pool_id, rule_id, allocated_resource_id, allocated_resource_name, allocated_method_id.

Example prompt: "What services are available in my expense data?"


query_expense_data

Query aggregated expense data with grouping, filtering, and sorting.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesQuery parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
start_datestring (YYYY-MM-DD)YesStart of date range
end_datestring (YYYY-MM-DD)YesEnd of date range
currencystringNoorganization currencyThe API accepts the currency of your organization only. Omit this field. It rejects every other value
granularitystringNodayTime bucket: hour, day, week, month, year, or total
group_byarrayNo[]Up to 3 dimensions. Each entry is a standard dimension name, for example "service_name", or a tag object from the table that follows
filtersobjectNoOne object, with one key for each dimension, as in the table that follows
metricsarrayNo["effective_cost", "billed_cost"]Metrics to return: billed_cost, effective_cost, list_cost, consumed_quantity
order_byarrayNo[]Up to 3 {"field": ..., "direction": ...} objects. field is date, billed_cost, effective_cost, list_cost, or consumed_quantity. direction is asc or desc, and the default is desc
limitintegerNoMaximum number of rows (1–100,000)

group_by entries: a plain string from the list of standard dimension names, or one of these objects:

sourceOther fieldsDescription
tagtype, keyCloud tags. type is keys to group by tag key, and you then omit key. type is values to group by the values of one tag, and key is then necessary. An example is {"source": "tag", "type": "values", "key": "Environment"}
allocated_tagtype, keyAllocated tags (JSON paths). Same type/key rules
derivedkeyA derived allocation dimension slug, for example {"source": "derived", "key": "team"}

filters object: one key per dimension you want to filter. Unknown keys are rejected.

Key(s)Value shape
Any standard dimension name, for example service_name, region_id, data_source_id, pool_id, or providerA list of the values to include, such as ["Amazon EC2"], or an object {"include": [...], "exclude": [...]} with at least one of the two keys
tags, allocated_tagsList of {"key": "...", "include": [...], "exclude": [...]} or {"key": "...", "exists": true} objects. exists cannot be combined with include/exclude
dimensionsList of {"key": "<slug>", "include": [...], "exclude": [...]} objects for derived allocation dimensions
billed_cost, effective_cost, list_cost, consumed_quantityList of {"value": <number>, "op": "gt" | "gte" | "lt" | "lte"} range conditions

Ordering rules: a cost metric used in order_by must also appear in metrics, and date cannot be used when granularity is total.

Example prompt: "Show me our AWS spending for January 2026 broken down by service, sorted by effective cost descending, top 10."


get_expense_dimension_lookups

Returns lookup tables to translate IDs (data_source_id, pool_id, rule_id) into user-friendly names. Use after query_expense_data when results contain IDs.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
include_poolsbooleanNoInclude pool name lookups
include_data_sourcesbooleanNoInclude data source name lookups

Example prompt: "Translate the data source IDs in my expense results to names."


Anomaly Detection

If you give no start_date and no end_date, the summary tools and the list tools use the last 90 days. A range that you give cannot be longer than 366 days.

get_anomaly_summary

Get aggregated anomaly counts by severity, anomaly type, and group. Use as a dashboard-style overview before drilling into individual anomalies.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
severityarrayNoFilter by severity: HIGH, MEDIUM, LOW
anomaly_typearrayNoFilter by type: COST_SPIKE, PATTERN_DEVIATION, RESOURCE_INEFFICIENCY, UNEXPECTED_RESOURCE
group_typearrayNoFilter by group: ORGANIZATION, DATA_SOURCE, SERVICE, REGION, POOL, PERSPECTIVE
start_datestring (YYYY-MM-DD)No90 days agoStart of date range
end_datestring (YYYY-MM-DD)NotodayEnd of date range

Example prompt: "Give me a summary of cost anomalies detected this month."


list_anomalies

List anomalies with filtering, sorting, and pagination. Use after get_anomaly_summary to inspect matching anomalies in detail.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesList parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
severityarrayNoFilter by severity: HIGH, MEDIUM, LOW (max 10)
anomaly_typearrayNoFilter by type: COST_SPIKE, PATTERN_DEVIATION, RESOURCE_INEFFICIENCY, UNEXPECTED_RESOURCE (max 10)
group_typearrayNoFilter by group: ORGANIZATION, DATA_SOURCE, SERVICE, REGION, POOL, PERSPECTIVE (max 10)
group_keyarray of stringsNoFilter by specific group keys (max 50)
start_datestring (YYYY-MM-DD)No90 days agoStart of date range
end_datestring (YYYY-MM-DD)NotodayEnd of date range
sort_bystringNodateSort field: date, severity, cost_impact, anomaly_score
sort_directionstringNodescasc or desc
limitintegerNo50Max results (1–500)
offsetintegerNo0Pagination offset

Example prompt: "Show me all high-severity cost anomalies from the last 30 days, biggest cost impact first."


get_anomaly

Get a single anomaly by ID with computed impact metrics and metadata. Use after list_anomalies for deeper inspection.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
anomaly_idUUIDYesAnomaly ID

Example prompt: "Show me the full details of anomaly abc-123."


Recommendations

list_all_scenarios

List recommendation scenarios and their configurable thresholds. Use to discover scenario IDs and threshold metadata before working with overrides or filtering recommendations.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
cloud_providerstringNoFilter by data source type. Accepts any DigiUsher data source type value, for example aws_cnr, azure_cnr, azure_tenant, gcp_cnr, gcp_tenant, oci_cnr, alibaba_cnr, kubernetes_cnr, databricks, nebius, snowflake, mongodb, focus_any

Example prompt: "What types of cost optimization scenarios does DigiUsher check for on AWS?"


get_scenario_by_id

Get one recommendation scenario by ID, including threshold definitions and optimization detection metadata.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
scenario_idstringYesScenario ID

Example prompt: "Show me the details of the rightsizing scenario."


list_threshold_overrides

List threshold overrides configured for the organization, optionally filtered by scenario. Use to audit customized scenario sensitivity.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
scenario_idstringNoFilter by scenario ID

Example prompt: "Are there any custom threshold overrides configured for our recommendations?"


get_threshold_override

Get a specific threshold override by ID. Use after list_threshold_overrides when details for one override are needed.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
override_idUUIDYesOverride ID

Example prompt: "Show me override abc-123."


list_recommendations

List cost optimization recommendations with filtering, sorting, and pagination. Common filters include status, severity, scenario tags, cloud account, and resource attributes.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesList parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
statusarrayNo["open"]Filter by status: open, applied, dismissed, snoozed, stale. (auto_resolved is deprecated; use stale)
severityarrayNoFilter by severity: low, medium, high, critical
scenario_idarray of stringsNoFilter by scenario
scenario_tagsarrayNoFilter by scenario tags: commitment, delete, resize, migrate, upgrade, quick_win, requires_planning, orphaned, idle, oversized, outdated, legacy, security, reliability
data_source_idarray of UUIDsNoFilter by data source
assignee_idarray of UUIDsNoFilter by assignee
commitment_idarray of UUIDsNoFilter to recommendations linked to specific commitments
resource_idarray of stringsNoFilter by resource ID
resource_typearray of stringsNoFilter by resource type
regionarray of stringsNoFilter by region
servicearray of stringsNoFilter by service
resource_tagsarrayNoList of {"key": "...", "include": [...], "exclude": [...]} or {"key": "...", "exists": true} objects. exists cannot be combined with include/exclude
created_at_start_datestring (YYYY-MM-DD)NoRecommendations created on or after this date (inclusive)
created_at_end_datestring (YYYY-MM-DD)NoRecommendations created on or before this date (inclusive)
group_bystringNoGroup the embedded savings summary by: scenario_id, severity, data_source_id, region, service
sort_bystringNoannual_savingsSort field: annual_savings, monthly_savings, severity, created_at, last_seen_at, status
sort_directionstringNodescasc or desc
limitintegerNo50Max results (1–500)
offsetintegerNo0Pagination offset

Example prompt: "Show me the top 5 open recommendations sorted by annual savings."


get_savings_summary

Get aggregated potential savings from recommendations, with optional filtering and grouping. Useful for executive summaries and trend breakdowns.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesSummary parameters. The Body fields table gives them

Body fields: the same filter fields as list_recommendations, without the pagination fields and the sorting fields. These fields are status (default ["open"]), severity, scenario_id, scenario_tags, data_source_id, assignee_id, commitment_id, resource_id, resource_type, region, service, resource_tags, created_at_start_date, created_at_end_date, and group_by.

Example prompt: "What's the total potential savings from all open recommendations, grouped by scenario?"


get_recommendation

Get one recommendation by ID, including the latest automation status and detailed payload.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
recommendation_idUUIDYesRecommendation ID

Example prompt: "Show me the full details of recommendation abc-123."


KPIs

list_kpi_definitions

List available KPI definitions, including units, categories, and favorable direction. Use before snapshot or time-series calls to select kpi_ids.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID

Available KPI IDs: effective_savings_rate, compute_commitment_coverage, commitment_discount_waste, allocation_accuracy_index, compute_cost_per_core, cost_per_gb_stored, legacy_resource_percentage, cost_optimization_index.

Example prompt: "What FinOps KPIs are available for my organization?"


get_kpi_snapshots

Get KPI values for a single date.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
datestring (YYYY-MM-DD)NoDate for the snapshot. Omit to use the API default
kpi_idsarrayNoFilter by KPI IDs (see list_kpi_definitions)

Example prompt: "What are our current KPI values?"


get_kpi_time_series

Get KPI values across a date range. start_date must be on or before end_date.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
start_datestring (YYYY-MM-DD)YesStart of date range
end_datestring (YYYY-MM-DD)YesEnd of date range
kpi_idsarrayNoFilter by KPI IDs (see list_kpi_definitions)

Example prompt: "How has our effective savings rate trended over the last 3 months?"


Unit Economics

Unit economics combine a cost expression with a North Star Metric (NSM) to compute cost per unit of business value. Dimension map groups translate raw billing dimension values into business categories that formulas can use.

list_dimension_map_groups

List dimension map groups in the organization. A dimension map group is a named set of mappings used to translate raw billing dimension values into business-meaningful categories.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID

Example prompt: "What dimension map groups are defined for unit economics?"


get_dimension_map_group

Get a single dimension map group by ID, including all of its source-to-target mapping entries.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
group_idUUIDYesDimension map group ID

Example prompt: "Show me the mappings in dimension map group abc-123."


list_formulas

List unit-economics formulas in the organization. Use to discover formula IDs before fetching or calculating one.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID

Example prompt: "What unit economics formulas do we have?"


get_formula

Get a single unit-economics formula by ID, including its cost expression, NSM reference, default grouping, and metadata.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
formula_idUUIDYesFormula ID

Example prompt: "Show me how the cost-per-transaction formula is defined."


calculate_formula

Calculate cost, NSM, and cost-per-unit for a formula over a date range. Returns one entry per period with totals plus a per-group breakdown.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
formula_idUUIDYesFormula ID (from list_formulas)
bodyobjectYesCalculation parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
start_datestring (YYYY-MM-DD)YesInclusive start of the calculation window
end_datestring (YYYY-MM-DD)YesInclusive end of the calculation window
granularitystringNoformula's base granularityday, week, or month. Must be at least as coarse as both the formula's base granularity and the NSM key's granularity
group_bystringNoNSM dimension to break each group's cost down by, in proportion to that dimension's NSM share. Cannot be a dimension already linked by the formula
filtersarrayNo[]List of {"dimension": "<key>", "values": [...]} objects. A filter changes the visible rows only. The share and the allocated cost still use the full NSM denominator, without the filter

Example prompt: "What was our cost per transaction each month last quarter?"


Chargeback

get_chargeback_for_month

Get chargeback data for a specific month. Returns persisted runs when available, or on-the-fly computed results for missing periods.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
monthstring (YYYY-MM-DD)YesA date in the month, for example 2026-01-01

Example prompt: "Show me the chargeback data for January 2026."


get_cost_allocation_summary

Get the showback summaries or the chargeback summaries of one or more months. DigiUsher moves start_date to the start of its month. end_date is inclusive, and it can be any date.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesSummary parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
start_datestring (YYYY-MM-DD)YesStart date (snapped to the start of the month)
end_datestring (YYYY-MM-DD)YesEnd date (inclusive)
viewstringYesshowback (cost per pool before redistribution) or chargeback (cost per pool after all redistributions)
granularitystringNomonthmonth or day
pool_idUUIDNoRestrict to one pool
filtersobjectNo{"service_names": [...], "regions": [...], "data_source_ids": [...]}. Every key is optional. The result contains the matching costs only
breakdown_dimensionsarrayNo[]Dimensions to break pool costs down by: service_name, data_source, region. Empty returns pool totals only

Example prompt: "Show me the chargeback allocation across teams for Q1 2026, by month."


get_cost_allocation_dimensions

Get available filter dimension values (services, regions, data sources) for cost allocation queries. Use this to discover valid filter options before calling get_cost_allocation_summary.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
start_datestring (YYYY-MM-DD)YesStart of date range
end_datestring (YYYY-MM-DD)YesEnd of date range
viewstringYesshowback or chargeback

Example prompt: "What services and regions are available for chargeback filtering?"


Forecasting

group_type accepts ORGANIZATION or SHOWBACK_POOL.

get_forecast_summary

Get a forecast overview for the organization or a specific showback pool. Returns projected totals, trend direction, and confidence range. Omit group_type and group_key for the org-level forecast.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
group_typestringNoORGANIZATIONORGANIZATION or SHOWBACK_POOL
group_keyUUIDNoPool ID when group_type is SHOWBACK_POOL

Example prompt: "What's the cost forecast for my organization?"


get_forecast_series

Get daily forecast time-series data for charting: actuals, predicted values, and confidence bands. Use after get_forecast_summary to drill into the trend.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
group_typestringNoORGANIZATIONORGANIZATION or SHOWBACK_POOL
group_keyUUIDNoPool ID when group_type is SHOWBACK_POOL

Example prompt: "Show me the daily forecast trend with confidence bands for next month."


get_forecast_batch

Get the forecast summary of every entry of one group_type, in one call. With SHOWBACK_POOL, you get the forecast summary of every pool. ORGANIZATION does not work here. For the organization, use get_forecast_summary.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
group_typestringYesSHOWBACK_POOL

Example prompt: "Give me forecast summaries for all cost pools at once."


Resource Inventory

get_resource_types

List available resource types for resource inventory queries. Use before get_dimension_values to select a valid resource_type.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
searchstringNoSearch filter
limitintegerNo100Max results (1–10,000)

Example prompt: "What resource types are in my cloud inventory?"


get_dimension_values

Get values for resource inventory dimensions for a specific resource type. This is for resource dimensions, not expense dimensions.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
resource_typestringYesResource type (from get_resource_types)
namestringYesDimension name: region, service, resource_group, tag_keys, or tag_values
keystringNoTag key (required when name is tag_values)
searchstringNoSearch filter
limitintegerNo100Max results (1–10,000)

Example prompt: "What regions do our EC2 instances run in?"


get_resource_time_series

Get the metric time series of one discovered cloud resource. Returns the daily metric values of the date range. The default range is the last 30 days.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
discovered_resource_idUUIDYesDiscovered resource ID
start_datestring (YYYY-MM-DD)No30 days agoStart of date range
end_datestring (YYYY-MM-DD)NotodayEnd of date range

Example prompt: "Show me the CPU utilization metrics for resource abc-123 over the last 30 days."


Governance

list_tagging_policies

List all tagging policies configured for the organization. Each policy defines required tags, allowed values, and the resources it applies to. Use to discover policy IDs before fetching details or violations.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID

Example prompt: "What tagging policies are enforced in our organization?"


get_tagging_policy

Get a single tagging policy by ID, including its rules, required tag keys, allowed values, and resource scope.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
policy_idUUIDYesTagging policy ID

Example prompt: "Show me the rules of the cost-center tagging policy."


list_tagging_violations

List individual tagging-policy violations across the organization, optionally filtered to one or more policies and paginated.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
policy_idsarray of UUIDsNoRestrict to these policies
sort_directionstringNodescdesc (newest first) or asc (oldest first)
offsetintegerNo0Pagination offset
limitintegerNo50Max results (1–500)

Example prompt: "List the 20 most recent resources violating our tagging policies."


get_tagging_violations_summary

Get a roll-up summary of tagging violations across the organization, including counts by policy and severity. Use for governance dashboards before drilling into individual violations.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID

Example prompt: "How many tagging violations do we have, by policy?"


AI Attribution

These tools report the spend of the AI coding agents. They need an AI telemetry data source, of the type ai_telemetry. If a tool returns a 404, call list_data_sources and look for such a source. The amounts use the currency of your organization, which is not always USD.

get_ai_spend_overview

Get header KPIs for AI coding-agent spend over one date window: total and estimated spend, spend by model family, blended rate per million tokens, cache hit ratio, run and active-user counts, and cost per active hour. Start here, then use query_ai_activity or list_ai_runs to break the window down.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
start_datestring (YYYY-MM-DD)YesFirst day of the window (inclusive)
end_datestring (YYYY-MM-DD)YesLast day of the window (inclusive)
data_source_idUUIDNoRestrict the result to one AI telemetry data source. Omit the field to use all of them

Example prompt: "How much did we spend on AI coding agents in August, and what was our cache hit ratio?"


query_ai_activity

Get a series of AI spend and tokens in buckets, with one breakdown dimension. The tool dimension works in another way. It fills tool_activity with the number of calls and the latency of each tool, and it returns an empty series and empty totals. A tool call has no spend of its own.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesQuery parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
start_datestring (YYYY-MM-DD)YesFirst day of the window (inclusive)
end_datestring (YYYY-MM-DD)YesLast day of the window (inclusive)
data_source_idUUIDNoRestrict to one AI telemetry data source
granularitystringNodayBucket size: day, week, month, quarter
dimensionstringNomodelBreakdown dimension: model, model_family, agent, team, department, cost_center, user, tool

Example prompt: "Break down last month's AI agent spend by team, week by week."


list_ai_runs

List agent runs (sessions) in the window with their spend, token, and event aggregates. Filter to one user or model, or pass run_id to drill into a single run, which also fills detail with that run's per-model split.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesQuery parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
start_datestring (YYYY-MM-DD)YesFirst day of the window (inclusive)
end_datestring (YYYY-MM-DD)YesLast day of the window (inclusive)
data_source_idUUIDNoRestrict to one AI telemetry data source
userstringNoFilter to one user (email or install ID)
modelstringNoKeep runs that used this model ID
run_idstringNoThe details of one run. The response then contains detail
sort_bystringNocostcost (reported spend) or last_activity
limitintegerNo50Max results (1–200)
offsetintegerNo0Pagination offset (ignored when run_id is set)

Example prompt: "Which agent sessions cost the most last week?"


get_ai_work_items_summary

Get the unit economics of the work items, which are the pull requests, that a person merged in the window. The result gives the cost for one merged work item, the cost for 100 added lines, and the part of the spend of the window that belongs to a work item. merged_items gives each item of the window the full spend of its runs, over the whole life of those runs. window_spend counts only the spend inside the window. You cannot calculate one of the two values from the other value.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
start_datestring (YYYY-MM-DD)YesFirst day of the window (inclusive)
end_datestring (YYYY-MM-DD)YesLast day of the window (inclusive)
data_source_idUUIDNoRestrict to one AI telemetry data source

Example prompt: "What did each merged pull request cost us in AI spend last month?"


list_ai_work_items

List the work items (pull requests) merged in the window with the AI spend attributed to each, the lines they added and deleted, and the quality of the join behind the attribution. Use list_ai_work_item_groups to roll these up by repository or author instead.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesQuery parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
start_datestring (YYYY-MM-DD)YesFirst day of the window (inclusive)
end_datestring (YYYY-MM-DD)YesLast day of the window (inclusive)
data_source_idUUIDNoRestrict to one AI telemetry data source
repostringNoRestrict to one repository. Use the full name, for example acme/widgets
sort_bystringNocompleted_atcompleted_at (merge date, newest first) or allocated_cost (attributed spend, highest first)
limitintegerNo50Max results (1–200)
offsetintegerNo0Pagination offset

Example prompt: "Show me the pull requests merged in the acme/widgets repo last month with the most AI spend attributed."


list_ai_work_item_groups

Roll the window's merged work items up by repository, author, or both, with cost per merged work item and cost per 100 added lines for each group. Rollups aggregate the whole window before they paginate, so group totals are complete.

ParameterTypeRequiredDefaultDescription
organization_idUUIDYesOrganization ID
bodyobjectYesQuery parameters. The Body fields table gives them

Body fields:

FieldTypeRequiredDefaultDescription
start_datestring (YYYY-MM-DD)YesFirst day of the window (inclusive)
end_datestring (YYYY-MM-DD)YesLast day of the window (inclusive)
data_source_idUUIDNoRestrict to one AI telemetry data source
repostringNoRestrict to one repository (full name)
group_byarrayNo["repo"]One or two distinct dimensions, outermost first: repo, author
limitintegerNo50Max results (1–200)
offsetintegerNo0Pagination offset

Example prompt: "Compare AI cost per merged pull request across our repositories."

On this page