Triage agent (GraphQL)

Related queries and mutations in AI features. Each has its own section.

Queries

getTriageAvailability (query)

getTriageAvailability is a query in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Triage availability and free-allowance status for the caller's account.

Arguments

ArgumentTypeDescription
alertIdUUIDAlert the triage would run on. When set, a reached limit is left out for an alert in a domain with an active teammate, which has no triage limit.

Returns

TriageAvailability!

Example

query GetTriageAvailability {
  getTriageAvailability {
    enabled
    reasons
    monthlyFreeBudget
    monthlyCompletedCount
    remainingFreeBudget
    dailyRunLimit
    dailyRunCount
    remainingDailyRuns
    monthlyRunLimit
    monthlyRunCount
    remainingMonthlyRuns
  }
}

Types used only by getTriageAvailability

TriageAvailability

Object type. Whether triage can run for the caller's account, plus the free-allowance and run-volume snapshots. Triage — automated and manual — pauses when the free monthly allowance is used up, when the account's daily run limit is reached (resumes at UTC midnight), or when its monthly run limit is reached (resumes at the start of the UTC month).

FieldTypeDescription
enabledBoolean!True when triage is available to the account right now.
reasons[TriageDenialReason!]!Why triage is unavailable; empty when enabled.
spendGuardrailReachedNoticeSpendGuardrailReachedNoticeThe spend guardrail that blocks triage. Null when none does, or when it is on a domain whose alerts and monitors the caller can't see.
monthlyFreeBudgetIntFree triages per calendar month (UTC) for accounts restricted to the free allowance; null when the account is unrestricted.
monthlyCompletedCountInt!Billable triages completed this calendar month (UTC).
remainingFreeBudgetIntFree triages left this month for restricted accounts (never negative); null when the account is unrestricted.
dailyRunLimitInt!Effective daily ceiling on triage runs. When the account has a per-account daily limit set, this is that limit and triage — automated and manual — pauses for the rest of the UTC day once it is reached; resets at UTC midnight. When no per-account daily limit is set, this is a high fixed safety ceiling that pauses only automated triage.
dailyRunCountInt!Triage runs today (UTC) counting against the daily limit. When a per-account daily limit is set, this counts automated and manual runs that are in flight or completed (runs that failed and won't be retried are excluded). When no per-account daily limit is set, it matches the auto-only safety ceiling — automated runs regardless of outcome.
remainingDailyRunsInt!Triage runs left today (UTC) against the daily limit; never negative.
monthlyRunLimitIntPer-account monthly cap on triage runs; null when the account has no monthly limit. Triage — automated and manual — pauses for the rest of the UTC month once this many runs are in flight or completed; resets at the start of the UTC month.
monthlyRunCountInt!Triage runs this UTC month counting against the monthly limit, across automated and manual triage: those in flight or completed. Runs that failed and won't be retried are excluded.
remainingMonthlyRunsIntTriage runs left this UTC month against the monthly limit (never negative); null when the account has no monthly limit.
TriageDenialReason

Enum type. Why triage is unavailable/denied for an account.

Shared by the reactive manual-triage denial (triage_alerts maps the
reason to a message and raises) and the proactive availability surface
(getTriageAvailability). The values are a stable GraphQL enum
(graphene.Enum.from_enum), so never rename an existing member.

ValueDescription
AI_FEATURES_OFF
MONTHLY_USAGE_LIMIT_REACHED
DAILY_RUN_LIMIT_REACHED
MONTHLY_RUN_LIMIT_REACHED
GUARDRAIL_REACHED

Related types

SpendGuardrailReachedNotice, UUID

Mutations

triageAlerts (mutation)

triageAlerts is a mutation in the Monte Carlo GraphQL API, in AI features. Send it to https://api.getmontecarlo.com/graphql with an API key; see API authentication.

Status: Experimental

Triage up to 50 alerts in a single call.

Arguments

ArgumentTypeDescription
inputTriageAlertsInput!

Returns

TriageAlertsOutput

Example

mutation TriageAlerts($input: TriageAlertsInput!) {
  triageAlerts(input: $input) {
    skippedAlreadyTriagedCount
    skippedLimitReachedCount
  }
}

Types used only by triageAlerts

TriageAlertsInput

Input object type.

FieldTypeDescription
incidentIds[UUID!]!UUIDs of incidents to triage. Maximum 50 per call.
sourceTriageBatchSourceWhere the triage was initiated from. Drives the deep-link target of the completion notification — ALERT lands the user on the alert detail page, FEED restores the alerts-feed cohort the user submitted from. Optional for backward compatibility with older clients; defaults to FEED server-side when omitted, which matches the historical caller (the alerts feed).
feedSearchParamsStringSerialized URL search params from the alerts feed at submit time, used to reconstruct the original cohort when the completion notification is clicked. Only meaningful when source == FEED; ignored otherwise. Capped at 2048 characters.
postToSlackBooleanWhether to post the triage summary as a Slack thread reply on the alert message when the run completes. Defaults to true. Pass false when the caller already shows the verdict to the user (e.g. the chat agent running in the Slack bot) so the summary isn't duplicated. Does NOT affect the alert message's own triage state — the in-progress status, completed priority dot, and Triage-button removal always sync — nor the in-product completion notification. Default: true.
triggerSourceTriageTriggerSourceThe surface this triage was dispatched from, recorded on the per-incident triage claim (usage accounting / analytics). Programmatic callers should declare themselves (MCP for the MCP triage tool, SLACK for the chat agent in the Slack bot). When omitted, resolution is: the surface the client names in its x-mcd-source request header (dashboard resolves to MANUAL_UI, mcp to MCP); otherwise SLACK if postToSlack is false (today's only such caller is the Slack-bot chat agent); otherwise MANUAL_UI.
TriageAlertsOutput

Object type.

FieldTypeDescription
triggeredRuns[TriageAgentRunResult!]!Newly-created PENDING triage runs, one per dispatched execution.
skippedAlreadyTriagedCountInt!Number of input incidents the caller had already triaged (any non-ERROR row exists). ERROR rows do not count as already triaged — they re-triage.
skippedLimitReachedCountInt!Number of input incidents left out because a triage limit is reached. Alerts in a domain with an active teammate have no limit and are never left out.
TriageBatchSource

Enum type. Where a triage batch was initiated from — used by the FE to reconstruct
the user's view when the completion notification is clicked.

ValueDescription
ALERT
FEED
TriageTriggerSource

Enum type.

ValueDescription
MANUAL_UI
SLACK
MCP

Related types

TriageAgentRunResult, UUID

Source: The GraphQL API reference

This page is generated from the GraphQL schema on each release. Changes made in ReadMe are overwritten.