Skip to main content
Better Stack MCP logo
  • Category: server monitoring
  • Auth: DCR_OAUTH
  • Composio-managed OAuth available? No
  • Tools: 116
  • Triggers: 0
  • Slug: BETTER_STACK_MCP
  • Version: 20261018_00

Tools

Slug: BETTER_STACK_MCP_ACKNOWLEDGE_INCIDENTAcknowledge an ongoing incident

Input Parameters

integer
required
The ID of the incident to acknowledge
string
User email or identifier of who acknowledged the incident. Optional - when omitted, the action is attributed to the authenticated OAuth user (or “API” for team/organisation API tokens). Only pass this if the user has explicitly told you who acknowledged the incident on their behalf.
Slug: BETTER_STACK_MCP_ADD_CHART_TO_DASHBOARDAdd a new chart to a dashboard. Use the section parameter to organize charts into named sections — sections are auto-created if they don’t exist, and charts are auto-positioned within them.REQUIRED: the query’s FROM must reference a source, either {{source}} or a source-type variable defined via set_dashboard_variable (e.g. {{redis_source}}). A query with no source is rejected with guidance to define it first.Dashboard chart queries run against the metrics collection: use sum(logs_count) (or the matching sum(<row_type>_count) for the source), avgMerge(value_avg), label('tag'). Do NOT use JSONExtract(raw, …) — that is for live-tail charts and query only; dashboards have no raw column. Call metrics_query_help with the source ID and context: 'chart_query' for available metrics/labels and chart-query-style examples.Workflow:
  1. Call chart_building_help for chart types, units, and settings.
  2. Call metrics_query_help with context: 'chart_query' to see the source’s metrics schema and chart-query examples.
  3. Verify the query with render_chart (runs it and surfaces errors automatically) or with query.
Use {{source}}, {{start_time}}, {{end_time}}, {{time}} variables for integration with dashboard filters. Queries can also reference custom dashboard variables — {{var}} (required) or [[ AND col = {{var}} ]] (optional clause, dropped while the variable is empty); define them with set_dashboard_variable.

Input Parameters

string
required
Name/title for the chart
string
required
SQL query. Its FROM must reference a source: {{source}}, or a source-type variable defined via set_dashboard_variable (e.g. {{redis_source}}); hardcoded collection names are rejected. Use {{start_time}}/{{end_time}} in the time filter and {{time}} for bucketing. Dashboard charts query the metrics collection (use sum(logs_count) / sum(spans_count) / sum(exceptions_count) / sum(replays_count) / sum(web_events_count) / sum(metrics_count) for type-specific counts, avgMerge(value_avg), label(‘tag’)); JSONExtract(raw, …) only works in live-tail charts.
integer
Chart width in grid units (1-12, default: 6)
integer
Chart height in grid units (default: 8)
string
Section name — chart is auto-placed within it. Section auto-created if it doesn’t exist.
object
Chart display settings. Which keys apply depends on chart_type: call chart_building_help for the per-type reference, possible values, and gotchas.
string ("line_chart" | "bar_chart" | "number_chart" | "table_chart" | "pie_chart" | "heatmap_chart" | "scatter_chart" | "gauge_chart" | "map_chart" | "hierarchy_chart" | "static_text_chart")
required
Type of chart to create
string
Short description of the chart.
integer
required
The ID of the dashboard to add the chart to
Slug: BETTER_STACK_MCP_ADD_DASHBOARD_SECTIONAdd a section divider to a dashboard. Sections span the full width and help organize charts into groups. Charts and sections at or below the insertion point are shifted down to make room

Input Parameters

integer
required
Y position (row) where section should appear
string
required
Section title (e.g., ‘Memory Metrics’, ‘Network’)
string
Short description of the section, shown as a tooltip next to section name in the UI. Use rarely, when wanting to show more context for non-obvious sections.
integer
required
The ID of the dashboard
Slug: BETTER_STACK_MCP_APPLICATIONGet comprehensive details of a specific application including its configuration, retention settings, ingestion details, custom bucket settings (if configured)

Input Parameters

integer
required
The ID of the application
Slug: BETTER_STACK_MCP_APPLICATIONSList all available applications in a paginated table format. Returns application ID, name, platform type, team, status (active/paused), data region, and creation date

Input Parameters

string
Filter applications by name (case-insensitive partial match)
integer
Page number for pagination (starts at 1)
integer
Filter applications by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_AVAILABLE_INCIDENT_ESCALATION_POLICIESGet available escalation policies for an incident

Input Parameters

integer
required
The ID of the incident
string
Filter by escalation type. Possible values: user, team, policy, schedule, organisation
Filter options by text (searches in names, emails, and other text fields)
Slug: BETTER_STACK_MCP_CHANGE_TEAM_MEMBER_ROLEChange a team member’s role. Identify the member by email or user_id (from team_members) and pass the target role_id (from team_roles). The admin role cannot be assigned, and an existing admin’s role cannot be changed, via the API. Pending invitations can’t have their role changed — cancel and re-invite instead. If the token can reach more than one team, pass team_id (or team_name).

Input Parameters

string
E-mail of the member whose role to change (alternative to user_id).
integer
required
ID of the role to assign (use team_roles to look up ids).
integer
ID of the team the member belongs to. Required when the token can access more than one team.
integer
ID of the member whose role to change (alternative to email).
string
Name of the team (alternative to team_id).
Slug: BETTER_STACK_MCP_CHARTGet detailed information about a specific chart including its SQL queries, configuration, and settings. Use dashboard first to find the chart ID

Input Parameters

integer
required
The ID of the chart to retrieve
Slug: BETTER_STACK_MCP_CHART_ALERTGet detailed information about a specific chart alert including its configuration, SQL queries, status, and current incident info. Use chart_alerts first to find the alert ID

Input Parameters

integer
required
The ID of the chart alert to retrieve
Slug: BETTER_STACK_MCP_CHART_ALERT_HELPGet instructions for creating and configuring chart alerts, including alert types, operators, configuration fields, supported chart types, and common mistakes. Call this before creating or editing chart alerts
Slug: BETTER_STACK_MCP_CHART_ALERTSList chart alerts with optional filtering by team, chart, or dashboard. Returns alert ID, name, type, chart, dashboard, and status

Input Parameters

integer
Page number for pagination (default: 1, 25 per page)
integer
Filter alerts by team ID (use teams to get team IDs)
integer
Filter to alerts on a specific chart
integer
Filter to alerts on charts in a specific dashboard
Slug: BETTER_STACK_MCP_CHART_BUILDING_HELPGet comprehensive instructions for building charts and dashboards, including chart types, units, axis settings, column mapping, legend placement, layout tips, and common mistakes. Call this before creating or editing charts
Slug: BETTER_STACK_MCP_CLUSTERSList all available storage clusters for a specific team. Returns a table with cluster IDs, names, and regions. Used primarily for creating cloud connections to query logs and metrics data directly via ClickHouse

Input Parameters

integer
required
The ID of the team (use teams to get team IDs)
Slug: BETTER_STACK_MCP_CREATE_APPLICATIONCreate a new application in Better Stack. Returns the created application details including ID, ingestion token, ingesting host URL, retention settings, and platform-specific integration documentation links with next steps for configuration

Input Parameters

string
required
The name of the application
integer
required
The ID of the team to create the application in (use teams to get team IDs)
string ("dot_net_errors" | "dot_net_maui_errors" | "dot_net_http_errors" | "aiohttp_errors" | "asgi_errors" | "asp_dot_net_errors" | "asp_dot_net_core_errors" | "aws_lambda_dot_net_errors" | "aws_lambda_node_errors" | "aws_lambda_python_errors" | "android_errors" | "angular_errors" | "astro_errors" | "azure_functions_node_errors" | "bottle_errors" | "javascript_errors" | "bun_errors" | "cli_errors" | "celery_errors" | "chalice_errors" | "cloudflare_pages_errors" | "connect_errors" | "dart_errors" | "deno_errors" | "django_errors" | "echo_errors" | "electron_errors" | "elixir_errors" | "ember_errors" | "express_errors" | "fasthttp_errors" | "falcon_errors" | "fastapi_errors" | "fastify_errors" | "fiber_errors" | "flask_errors" | "flutter_errors" | "go_errors" | "gatsby_errors" | "gin_errors" | "godot_errors" | "google_cloud_function_dot_net_errors" | "google_cloud_function_node_errors" | "google_cloud_function_python_errors" | "hapi_errors" | "iris_errors" | "java_errors" | "koa_errors" | "kotlin_errors" | "laravel_errors" | "log4j_errors" | "logback_errors" | "minidump_errors" | "native_errors" | "negroni_errors" | "nest_js_errors" | "next_js_errors" | "node_errors" | "nuxt_errors" | "php_errors" | "powershell_errors" | "pyramid_errors" | "python_errors" | "qt_errors" | "quart_errors" | "rq_errors" | "rack_middleware_errors" | "rails_errors" | "react_errors" | "react_native_errors" | "react_router_framework_errors" | "remix_errors" | "ruby_errors" | "rust_errors" | "sanic_errors" | "serverless_python_errors" | "solid_errors" | "solidstart_errors" | "spring_errors" | "spring_boot_errors" | "starlette_errors" | "svelte_errors" | "sveltekit_errors" | "symfony_errors" | "tanstack_start_react_errors" | "tornado_errors" | "tryton_errors" | "unity_errors" | "unreal_engine_errors" | "vue_errors" | "wpf_errors" | "wsgi_errors" | "windows_forms_errors" | "ios_errors" | "macos_errors")
required
The platform of the application
string
The data region for the application. Use ‘data_regions’ tool to see available options for your organization. Common values for most plans: us_east, germany, singapore. Ask the user if unsure.
boolean
Whether to start with ingesting paused (default: false)
Slug: BETTER_STACK_MCP_CREATE_CHART_ALERTCreate a new chart alert on an existing chart. The chart must support alerts (line_chart, bar_chart, number_chart, or tail_chart with time variables). Call chart_alert_help for configuration reference. Use chart or dashboard first to find the chart ID

Input Parameters

boolean
SMS notifications (default: false)
boolean
Phone notifications (default: false)
string
required
Name of the alert
boolean
Push notifications (default: false)
boolean
Email notifications (default: true)
number
Threshold value (required for threshold/relative types). For relative type, this is a percentage (e.g., 50 means 50%)
integer
required
The ID of the chart to add the alert to
string ("equal" | "higher_than" | "higher_than_or_equal" | "lower_than" | "lower_than_or_equal" | "increases_by" | "decreases_by" | "changes_by")
required
Comparison operator. For relative type also: increases_by, decreases_by, changes_by
string ("threshold" | "relative" | "anomaly_rrcf")
required
Alert type: ‘threshold’ (fixed value), ‘relative’ (percentage change), ‘anomaly_rrcf’ (ML-based anomaly detection)
integer ("30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "10800" | "21600" | "43200" | "86400")
How often to run the alert check (seconds). Max 3600 for query-period-based alerts
integer ("30" | "60" | "120" | "300" | "600" | "1800" | "3600")
Seconds to look back for relative alerts and tail/table charts
array
Specific series to monitor. Empty = all series. Mutually exclusive with series_names_except
integer ("30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "10800" | "21600" | "43200" | "86400")
Anomaly chart aggregation interval (seconds). Only for anomaly_rrcf alerts
string ("any" | "higher" | "lower")
Anomaly trigger direction: ‘any’ (default), ‘higher’, ‘lower’. Only for anomaly_rrcf alerts
string ("0" | "30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "14400")
How long the condition must be resolved before auto-resolving (seconds, default: 60). null means never auto-resolve; the incident stays open until resolved manually
string
‘current_team’ (default) or a GID like gid://uptime/Policy/123 or gid://uptime/Team/456
integer
Anomaly significance threshold (1-10, default 5), shown as ‘Significance’ in the UI. Higher = larger deviation required to fire, so FEWER alerts; lower = more sensitive, more alerts. Only for anomaly_rrcf alerts
integer ("0" | "30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "14400")
How long the condition must persist before creating an incident (seconds, default: 60)
array
Series to exclude; alert fires on every other series. Mutually exclusive with series_names
integer ("30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "10800" | "21600" | "43200" | "86400")
Data range for threshold alerts on line/bar/number charts (‘on data from’ in UI, default: 60s)
integer
How many days of data the anomaly model is first trained on (1-30, default 7), shown as ‘Initial training data range’ in the UI. A full week (7) captures daily and weekly pattern shifts. Only for anomaly_rrcf alerts
Slug: BETTER_STACK_MCP_CREATE_CLOUD_CONNECTIONCreate a secure cloud connection for direct ClickHouse query access to logs, spans, and metrics data. Returns connection credentials (host, port, username, password), sample queries for each data type, and cURL command examples. Connections expire after 1 hour by default

Input Parameters

string
Optional note for the connection
integer
required
The ID of the team (use teams to get team IDs)
integer
The ID of the source (required, when cluster_id is empty)
integer
The ID of the cluster to use (required, when source_id is empty)
Slug: BETTER_STACK_MCP_CREATE_DASHBOARDCreate a new dashboard. Optionally use a template to start with pre-configured charts. Call chart_building_help for guidance on dashboard structure and layout. Optionally specify a source_id to preconfigure the dashboard with that source. Returns the new dashboard ID which can be used with add_chart_to_dashboard to add charts

Input Parameters

string
required
Name for the new dashboard
integer
required
The ID of the team to create the dashboard in (use teams to get team IDs)
integer
Optional source ID to preconfigure dashboard with that source’s metrics
integer
Optional template ID to create dashboard from (use dashboard_templates to see available templates)
string
Optional resource group name to place the dashboard in. If a group with this name already exists for the team it will be reused; otherwise a new group is created.
Slug: BETTER_STACK_MCP_CREATE_ERROR_ISSUECreate an issue for an error in Linear, or a work item in Jira, through the team’s integration and link the two. The issue gets Better Stack’s standard body (error type, message, call site, stack trace, occurrence counts and a link back) and the integration’s configured defaults for team or space, work type, assignee, labels and priority. Better Stack then posts every change to the error state as a comment on the issue. An error that already has an issue through the integration is reported, not duplicated; use link_error_issue to attach an issue that already exists.

Input Parameters

string
Extra context for whoever picks the issue up, placed above the standard error details in the issue body
string
Issue title. Defaults to Better Stack’s standard one: [application] error type: message
string
required
The error pattern identifier
integer
required
The ID of the application
integer
The Better Stack integration to create the issue through. Only needed when the team has more than one Linear or Jira integration, in which case this tool answers with the IDs to choose from.
Slug: BETTER_STACK_MCP_CREATE_HEARTBEATCreate a new heartbeat that expects a periodic request from a cron job, worker, or other background task, and alerts when that request stops arriving.Provide a name for the heartbeat. The heartbeat reports down once no request is received within period seconds plus the grace window. Use the returned heartbeat URL as the endpoint your job pings on every successful run.

Input Parameters

boolean
Send SMS alerts when the heartbeat goes down.
boolean
Call the on-call person when the heartbeat goes down.
string
required
Human-friendly name for the heartbeat.
boolean
Send push notification alerts when the heartbeat goes down.
boolean
Send e-mail alerts when the heartbeat goes down.
integer
Extra seconds to wait after the period elapses before reporting the heartbeat as down. Defaults to 300.
boolean
Create the heartbeat in a paused state, so it expects no requests and raises no incidents until resumed.
integer
How often you expect a request, in seconds. The heartbeat reports down if no request arrives within this window plus the grace period. Defaults to 86400 (one day).
integer
The ID of the team to create the heartbeat in (use list_heartbeats to see team IDs). Required only when the API token has access to multiple teams.
integer
ID of the escalation policy to use for alerting.
integer
Seconds to wait before escalating to the whole team.
integer
Position of the heartbeat in the list, set to NULL to sort by creation date.
boolean
Send critical push notifications that ignore the device mute switch and Do Not Disturb.
string
End of the daily maintenance window (e.g. “03:00:00”).
array
Days the maintenance window applies to (e.g. [“mon”, “tue”, “wed”]).
string
Start of a daily maintenance window during which alerts are paused (e.g. “01:00:00”).
integer
ID of the heartbeat group to add this heartbeat to.
string
Timezone for the maintenance window (e.g. “UTC”, “Europe/Berlin”). Defaults to UTC.
Slug: BETTER_STACK_MCP_CREATE_INCIDENTCreate a new incident providing a summary of the issue, requester email, and other optional details

Input Parameters

boolean
Send SMS to on-call person
boolean
Call on-call person
string
Short incident name
boolean
Send email to on-call person
string
required
Brief incident summary
integer
required
The ID of the team (use teams to get team IDs)
object
Additional incident key-value metadata
string
Escalation policy ID
integer
Seconds to wait before escalating to team
string
Full incident description
boolean
Send critical push notification
string
Email of the incident requester. Optional when authenticated via OAuth - defaults to the OAuth user. Required when using a team or organisation API token.
Slug: BETTER_STACK_MCP_CREATE_INCIDENT_COMMENTCreate a comment on an incident

Input Parameters

string
required
The content of the comment (Markdown is supported for formatting)
integer
required
The ID of the incident to comment on
Slug: BETTER_STACK_MCP_CREATE_METRIC_EXPRESSIONCreate a new metric expression (extract-metrics-from-logs rule) on a source.sql_expression runs against each log row; log fields live inside the raw JSON column — use JSONExtract(raw, 'path', 'Nullable(Type)'). The Nullable(...) wrapper is required. Nested paths use positional args: JSONExtract(raw, 'request', 'headers', 'user-agent', 'Nullable(String)'). Call source_fields to see what fields exist.Pass aggregations (e.g. ["avg", "count"]) for an aggregated metric, or omit / pass [] for a label (group-by column).Prefer build_type: new_data (default). historical_logs re-runs the rule over every stored log — expensive; only when the user explicitly asks.

Input Parameters

string
required
Metric name. Letters, numbers, and underscores only
string ("string" | "string_low_cardinality" | "int64_delta" | "int64" | "uint64_delta" | "uint64" | "float64_delta" | "datetime64_delta" | "boolean")
required
ClickHouse storage type for the extracted value
integer
required
The ID of the source (use sources to get source IDs)
string ("new_data" | "historical_logs")
How to process existing data: ‘new_data’ (default, cheap) only applies to new logs; ‘historical_logs’ rebuilds metrics from existing logs
array
Aggregations to compute for this metric (e.g. [‘avg’, ‘count’]). Omit or pass [] to store the value as a label (group-by column) instead of an aggregated metric
string
required
ClickHouse SQL expression evaluated against each log row (e.g. “JSONExtractInt(raw, ‘status’)”)
Slug: BETTER_STACK_MCP_CREATE_MONITORCreate a new monitor that tracks the availability of a website, host, or service.Provide the url to monitor. For ping, TCP, UDP, SMTP, POP, IMAP, and DNS monitors this is the host (e.g. example.com) rather than a full URL. The monitor starts checking immediately unless paused is set to true.

Input Parameters

boolean
Send SMS alerts when the monitor goes down.
string
required
URL to monitor (e.g. https://example.com). For ping, TCP, UDP, SMTP, POP, IMAP, and DNS monitors, provide the host instead (e.g. example.com).
boolean
Call the on-call person when the monitor goes down.
integer
Port to check. Used for tcp, udp, smtp, pop, and imap monitors.
boolean
Send push notification alerts when the monitor goes down.
boolean
Send e-mail alerts when the monitor goes down.
boolean
Create the monitor in a paused state, so it performs no checks until resumed.
array
Regions to check from (e.g. [“us”, “eu”, “as”, “au”]).
integer
The ID of the team to create the monitor in (use monitors to see team IDs). Required only when the API token has access to multiple teams.
integer
ID of the escalation policy to use for alerting.
integer
Seconds to wait before escalating to the whole team.
boolean
Verify the SSL certificate when checking HTTPS URLs.
string
HTTP method to use for the check (e.g. get, post, head).
string ("status" | "expected_status_code" | "keyword" | "keyword_absence" | "ping" | "tcp" | "udp" | "smtp" | "pop" | "imap" | "dns" | "playwright")
What kind of check to run. Defaults to “status” (HTTP up/down). Use “keyword”/“keyword_absence” to assert a response body keyword, “expected_status_code” to assert specific HTTP codes, and “ping”/“tcp”/“udp”/“smtp”/“pop”/“imap”/“dns” for the matching protocol.
string
Request body to send with the check.
boolean
Send critical push notifications that ignore the device mute switch and Do Not Disturb.
integer
How often to check the monitor, in seconds (e.g. 30, 180).
integer
Seconds the monitor must stay healthy before a related incident is resolved.
array
Custom request headers to send with the check.
integer
How long to wait for a response before the check times out, in seconds.
boolean
Follow HTTP redirects when checking the monitor.
integer
ID of the monitor group to add this monitor to.
string
Keyword to search for in the response body. Required for the keyword and keyword_absence monitor types.
string
Human-friendly name for the monitor. Defaults to the URL host.
integer
Seconds to wait and re-check before confirming the monitor is down.
array
HTTP status codes considered healthy. Used with the expected_status_code monitor type.
Slug: BETTER_STACK_MCP_CREATE_RELEASERegister a release for an errors application, so it appears the moment it deploys instead of when its first error arrives. Returns the release ID, usable with remove_release

Input Parameters

string
required
Release version or commit ref, e.g. ‘v1.2.3’
array
Environments this release was deployed to, e.g. [‘production’]
integer
required
The ID of the errors application to register the release for
Slug: BETTER_STACK_MCP_CREATE_SOURCECreate a new log source in Better Stack. Returns the created source details including ID, ingestion token, ingesting host URL, retention settings, and platform-specific integration documentation links with next steps for configuration

Input Parameters

string
required
The name of the source
integer
required
The ID of the team to create the source in (use teams to get team IDs)
string ("apache2" | "datadog_agent" | "docker" | "haproxy" | "kubernetes" | "nginx" | "open_telemetry" | "ubuntu" | "vector" | "vercel_integration" | "dokku" | "fly_io" | "heroku" | "dotnet" | "aws" | "aws_elb" | "aws_fargate" | "aws_cloudwatch" | "aws_ecs" | "azure" | "azure_logs" | "cloudflare_worker" | "cloudflare_logpush" | "erlang" | "fastly" | "filebeat" | "gcp" | "go" | "java" | "javascript" | "php" | "python" | "ruby" | "winlogbeat" | "elasticsearch" | "mongodb" | "mysql" | "postgresql" | "rabbitmq" | "redis" | "traefik" | "google_cloud_pubsub" | "http" | "digitalocean" | "fluentbit" | "fluentd" | "logstash" | "rsyslog" | "render" | "syslog-ng" | "cloudflare_prometheus_exporter" | "minio" | "prometheus" | "prometheus_scrape" | "flights" | "collector")
required
The platform for the source (e.g., nginx, docker, kubernetes, http, vector)
string
The data region for the source. Use ‘data_regions’ tool to see available options for your organization. Common values for most plans: us_east, germany, singapore. Ask the user if unsure.
integer
Log retention in days (default: 30)
boolean
Whether to start with ingesting paused (default: false)
Slug: BETTER_STACK_MCP_CREATE_STATUS_PAGE_REPORTCreate a new status page report

Input Parameters

string
required
The title of the status report
string
End time for the report (ISO 8601 format, required for maintenance reports)
string
required
The initial status update message
integer
Optional team ID (use teams to get team IDs). Status pages belong to organizations, so this is only needed to narrow the lookup to one team’s organization
string
Start time for the report (ISO 8601 format)
string ("manual" | "maintenance")
Type of report - manual (incident) or maintenance (default: manual)
string
When the report should be published (ISO 8601 format, default: now)
integer
required
The ID of the status page
array
Array of affected resources with status_page_resource_id and status
boolean
Whether to notify subscribers via email (default: false)
Slug: BETTER_STACK_MCP_CREATE_STATUS_PAGE_REPORT_UPDATECreate a new status update for an existing status page report

Input Parameters

string
The status update message
integer
required
The ID of the status report
string
When the update should be published (ISO 8601 format, default: now)
integer
required
The ID of the status page
array
required
Array of affected resources with status_page_resource_id and status
boolean
Whether to notify subscribers via email (default: false)
Slug: BETTER_STACK_MCP_CREATE_STATUS_PAGE_RESOURCEAdd a resource (monitor, heartbeat, or group) to a status page.Provide the resource_type and resource_id of the thing to display, plus a public_name shown to visitors (usually the resource’s own name). Use status_page_sections to find the section to place it in; when omitted the resource is added to the status page’s first section.

Input Parameters

integer
The ID of the team that owns the status page. Required only when the API token has access to multiple teams.
integer
Zero-based position of the resource within its section
string
Optional description shown under the resource
string
required
Name shown to visitors, usually the resource name
integer
required
The ID of the monitor, heartbeat, or group to add
string ("plain" | "history" | "intraday_history" | "response_times" | "intraday_response_times" | "chart_only")
How the resource is displayed. “history” shows the daily uptime bar, “plain” hides it.
string ("Monitor" | "Heartbeat" | "MonitorGroup" | "HeartbeatGroup")
required
What kind of resource to add
integer
required
The ID of the status page
integer
The ID of the section to add the resource to (use status_page_sections to list them). Defaults to the first section.
Slug: BETTER_STACK_MCP_CREATE_STATUS_PAGE_SECTIONCreate a section (resource group) on a status page to group resources under a heading

Input Parameters

string
required
The section heading shown to visitors
integer
The ID of the team that owns the status page. Required only when the API token has access to multiple teams.
integer
Zero-based position of the section on the status page
integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_DASHBOARDGet detailed information about a specific dashboard including its charts, sections, layout, template variables, and configuration. Use this to understand a dashboard structure before modifying it

Input Parameters

integer
required
The ID of the dashboard to retrieve
Slug: BETTER_STACK_MCP_DASHBOARD_QUERY_HELPGet instructions for writing a ClickHouse query to use inside a Better Stack Dashboard chart (or chart alert).The query uses template variables ({{source}}, {{time}}, {{start_time}}, {{end_time}}) and runs against the source’s metrics collection — it is meant to be saved as a dashboard chart via add_chart_to_dashboard / edit_chart, NOT run directly.To instead write an ad-hoc query you will run directly via query or render_chart, use metrics_query_help.

Input Parameters

integer
required
The source ID
Slug: BETTER_STACK_MCP_DASHBOARDSList all available dashboards in a paginated table format. Returns dashboard ID, name, creation date, and last updated date

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Filter dashboards by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_DASHBOARD_TEMPLATESList all available dashboard templates in a paginated table format. Returns template ID, name, description, and other metadata

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_DATA_REGIONSList all available data regions and clusters for application and source creation. Returns a table with region IDs (to use when creating applications or sources), display names, types (Region or Cluster), and geographical locations. Includes usage instructions for both standard regions and custom clusters
Slug: BETTER_STACK_MCP_DELETE_CHART_ALERTDelete a chart alert permanently. This will also clean up any associated incidents and anomaly models. This action cannot be undone. Use chart_alerts or chart_alert first to find the alert ID

Input Parameters

integer
required
The ID of the chart alert to delete
Slug: BETTER_STACK_MCP_DELETE_METRIC_EXPRESSIONDelete a metric expression from a source. This action cannot be undone. Call metric_expressions first to get the ID.build_type: new_data (default) stops the rule from applying to future logs but leaves already-extracted data. build_type: historical_logs also rebuilds the source’s metrics without this rule — expensive.

Input Parameters

string
required
The metric expression ID returned by metric_expressions, e.g. “m-123” or “g-456”
integer
required
The ID of the source (use sources to get source IDs)
string ("new_data" | "historical_logs")
How to process existing data: ‘new_data’ (default) only stops new data; ‘historical_logs’ also rebuilds historical metrics without this rule
Slug: BETTER_STACK_MCP_DOCUMENTATIONSearch for relevant documentation articles and return their contents

Input Parameters

string
Direct URL to a specific documentation article
string
The search query to find relevant documentation articles
Slug: BETTER_STACK_MCP_EDIT_APPLICATIONEdit an existing application in Better Stack - rename it, pause or resume ingesting, or set its VRL transformations, including the exception grouping program. Only provide the fields you want to change. Use applications or application first to find the application ID.

Input Parameters

integer
required
The ID of the application to edit
string
New name for the application
boolean
Set to true to temporarily pause data ingesting for this application, false to resume it
string
VRL transformation applied to logs during ingestion. Set to an empty string to remove, omit to leave unchanged.
string
VRL transformation applied to traces (spans) during ingestion. Set to an empty string to remove, omit to leave unchanged.
string
VRL transformation applied to session replays during ingestion. Set to an empty string to remove, omit to leave unchanged.
string
VRL transformation applied to exceptions during ingestion. This is what controls how exceptions are grouped into errors: it should set the ._pattern grouping key. Set to an empty string to remove a custom program, omit to leave unchanged.
string
VRL transformation applied to web events (page views and web vitals) during ingestion. Set to an empty string to remove, omit to leave unchanged.
Slug: BETTER_STACK_MCP_EDIT_CHARTEdit an existing chart name, query, type, or settings. Only provide the fields you want to change.If changing the query: the new query’s FROM must reference a source, either {{source}} or a source-type variable defined via set_dashboard_variable (queries with no source are rejected).Dashboard chart queries run against the metrics collection: use sum(logs_count) (or the matching sum(<row_type>_count) for the source), avgMerge(value_avg), label('tag'). JSONExtract(raw, …) only works in live-tail charts — dashboards have no raw column.Verify the new query with render_chart (runs it and surfaces errors automatically) or with query before saving.Queries can also reference custom dashboard variables — {{var}} (required) or [[ AND col = {{var}} ]] (optional clause, dropped while the variable is empty); define them with set_dashboard_variable.Call chart_building_help for chart/settings reference and metrics_query_help with context: 'chart_query' for the source’s metrics schema and chart-query-style examples. Use dashboard first to find the chart ID.

Input Parameters

integer
required
The ID of the chart to edit
string
New name for the chart
string
New SQL query. Its FROM must reference a source: {{source}}, or a source-type variable defined via set_dashboard_variable (e.g. {{redis_source}}); hardcoded collection names are rejected. Use {{start_time}}/{{end_time}} in the time filter and {{time}} for bucketing. Dashboard charts query the metrics collection (use sum(logs_count) / sum(spans_count) / sum(exceptions_count) / sum(replays_count) / sum(web_events_count) / sum(metrics_count) for type-specific counts, avgMerge(value_avg), label(‘tag’)); JSONExtract(raw, …) only works in live-tail charts.
integer
New width in grid units (1-12). Grid is 12 columns wide.
integer
New height in grid units (1-50).
object
Chart display settings. Which keys apply depends on chart_type: call chart_building_help for the per-type reference, possible values, and gotchas.
string ("line_chart" | "bar_chart" | "number_chart" | "table_chart" | "pie_chart" | "heatmap_chart" | "scatter_chart" | "gauge_chart" | "map_chart" | "hierarchy_chart" | "static_text_chart")
New chart type
string
Short description of the chart. Set to empty string to clear.
Slug: BETTER_STACK_MCP_EDIT_CHART_ALERTEdit an existing chart alert configuration. Only provide the fields you want to change. Call chart_alert_help for configuration reference. Use chart_alerts or chart_alert first to find the alert ID

Input Parameters

integer
required
The ID of the chart alert to edit
boolean
SMS notifications
boolean
Phone notifications
string
New name for the alert
boolean
Push notifications
boolean
Email notifications
number
New threshold value
string ("equal" | "higher_than" | "higher_than_or_equal" | "lower_than" | "lower_than_or_equal" | "increases_by" | "decreases_by" | "changes_by")
New comparison operator
string ("threshold" | "relative" | "anomaly_rrcf")
New alert type
integer ("30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "10800" | "21600" | "43200" | "86400")
How often to run the alert check (seconds)
integer ("30" | "60" | "120" | "300" | "600" | "1800" | "3600")
Seconds to look back for relative alerts
array
Specific series to monitor. Mutually exclusive with series_names_except
integer ("30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "10800" | "21600" | "43200" | "86400")
Anomaly chart aggregation interval (seconds)
string ("any" | "higher" | "lower")
Anomaly trigger: ‘any’, ‘higher’, ‘lower’
string ("0" | "30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "14400")
How long the condition must be resolved before auto-resolving (seconds). null means never auto-resolve; the incident stays open until resolved manually
string
‘current_team’ or a GID like gid://uptime/Policy/123 or gid://uptime/Team/456
integer
Anomaly significance threshold (1-10, default 5), shown as ‘Significance’ in the UI. Higher = larger deviation required to fire, so FEWER alerts; lower = more sensitive, more alerts
integer ("0" | "30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "14400")
How long the condition must persist before creating an incident (seconds)
boolean
When true, each alerting series opens its own incident instead of one shared incident
array
Series to exclude; alert fires on every other series. Mutually exclusive with series_names
integer ("30" | "60" | "120" | "300" | "600" | "1800" | "3600" | "7200" | "10800" | "21600" | "43200" | "86400")
Data range for threshold alerts (‘on data from’ in UI)
integer
How many days of data the anomaly model is first trained on (1-30, default 7), shown as ‘Initial training data range’ in the UI
Slug: BETTER_STACK_MCP_EDIT_DASHBOARDEdit an existing dashboard’s name or source eligibility. Only provide the fields you want to change. Use dashboard first to find the dashboard ID.

Input Parameters

integer
required
The ID of the dashboard to edit
string
New name for the dashboard
string
Source eligibility SQL — the ClickHouse query that decides which sources (and services) the dashboard applies to. It runs against the source’s metrics collection and must return a single truthy/falsy value (e.g. SELECT count() > 0 FROM {{source}}); the dashboard is offered for a source only when the query returns truthy. The selected source and time range are injected automatically (as the {{source}}, {{start_time}}, and {{end_time}} variables), so the query should not reference any other dashboard variables. Call metrics_query_help with context: 'chart_query' for the source’s metrics schema and query syntax. Set to an empty string to clear eligibility and make the dashboard visible for all sources; omit to leave it unchanged.
Slug: BETTER_STACK_MCP_EDIT_DASHBOARD_SECTIONEdit an existing dashboard section. Only provide the fields you want to change. Use dashboard first to find the section ID

Input Parameters

integer
required
The ID of the section to edit
string
New section title
boolean
Whether the section is collapsed (true = folded, false = expanded)
string
Short description shown as a tooltip next to the section name. Pass an empty string to clear it.
Slug: BETTER_STACK_MCP_ERRORGet comprehensive details of a specific error including its type, message, call site information, first occurrence, current state (unhandled, unresolved, ignored, resolved, or reoccurred), and linked Linear/Jira issues

Input Parameters

string
required
The error pattern identifier
integer
required
The ID of the application
Slug: BETTER_STACK_MCP_ERRORSList error patterns for an application with occurrence counts, affected users, current state, and links. Defaults to unresolved errors and supports filtering by state. For specialized error analytics or custom SQL, use errors_query_help instead.

Input Parameters

integer
Page number for pagination (starts at 1)
string
Search by error type or message
string ("all" | "new" | "unresolved" | "ignored" | "resolved" | "reoccurred" | "unhandled")
Filter by error state. Defaults to ‘unresolved’. ‘unresolved’ includes reoccurred errors and errors not yet triaged.
string
Filter by release version
string
End of time range (e.g. ‘now’). Default: ‘now’
string ("last_seen" | "first_seen" | "exceptions_count" | "users_count")
Sort order. Default: ‘last_seen’
string
Start of time range (e.g. ‘now-3d’, ‘2024-01-01T00:00:00Z’). Default: ‘now-3d’
string
Filter by environment (for example, ‘production’ or ‘staging’)
integer
required
The ID of the application
Slug: BETTER_STACK_MCP_ERRORS_QUERY_HELPGet comprehensive instructions for building SQL ClickHouse queries for error tracking, including both error patterns (metrics) and individual exceptions. Explains when to use each source and provides examples for common use cases

Input Parameters

integer
required
The application (source) ID
Slug: BETTER_STACK_MCP_ESCALATE_INCIDENTEscalate an ongoing incident to a user, team, schedule, or policy

Input Parameters

integer
required
The ID of the incident to escalate
boolean
Send SMS notification
boolean
Send phone call notification
boolean
Send push notification
boolean
Send email notification
integer
Define which team to escalate to. Either team_name or team_id required when escalating to Team.
integer
Define which team member to escalate to. Either user_email or user_id required when escalating to User.
integer
Define which escalation policy to escalate to. Required when escalating to Policy.
string
Define which team to escalate to. Either team_name or team_id required when escalating to Team.
string
Define which team member to escalate to. Either user_email or user_id required when escalating to User.
integer
Define which on-call calendar to escalate to. Required when escalating to Schedule.
boolean
Send as critical alert
string
required
Type of escalation: User, Team, Schedule, Policy, or Organization
Slug: BETTER_STACK_MCP_ESCALATION_POLICIESList all escalation policies with their steps and configuration

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Filter by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_ESCALATION_POLICYGet detailed information about a specific escalation policy

Input Parameters

integer
required
The ID of the escalation policy
Slug: BETTER_STACK_MCP_EXPLORATIONGet detailed information about a specific exploration (saved Explore query) including its sources, chart type, template variables, saved time range, and query. Use this to understand an exploration before modifying its source or variables

Input Parameters

integer
required
The ID of the exploration to retrieve
Slug: BETTER_STACK_MCP_EXPLORATIONSList saved explorations (saved Explore queries) in a paginated table. Returns exploration ID, name, chart type, sources, group, and last updated date. Use this to discover explorations before viewing or modifying one

Input Parameters

integer
Page number for pagination (starts at 1)
string
Optional search query to filter explorations by name
integer
Filter explorations by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_EXPLORE_LOGS_QUERY_HELPGet instructions for writing a ClickHouse query to use inside the Better Stack Explore logs page (and live-tail charts) for log and span data.The query uses template variables ({{source}}, {{time}}, {{start_time}}, {{end_time}}) and reads fields from the raw JSON column — it is meant to be used in the Explore UI, NOT run directly.To instead write an ad-hoc logs/spans query you will run directly via query, use query_help.

Input Parameters

integer
required
The source ID
string ("logs" | "spans")
Type of source data to query (default: logs)
Slug: BETTER_STACK_MCP_EXPORT_DASHBOARDExport a dashboard configuration as JSON. Returns the complete dashboard data structure including charts, sections, presets, and settings

Input Parameters

integer
required
The ID of the dashboard or dashboard template to export
Slug: BETTER_STACK_MCP_HEARTBEATGet details of a specific heartbeat

Input Parameters

integer
required
The ID of the heartbeat
Slug: BETTER_STACK_MCP_HEARTBEAT_AVAILABILITYGet availability summary for a specific heartbeat

Input Parameters

integer
required
The ID of the heartbeat
string
End date (YYYY-MM-DD format)
string
Start date (YYYY-MM-DD format)
Slug: BETTER_STACK_MCP_HEARTBEATSList all heartbeats with filtering and pagination options

Input Parameters

string
Filter by heartbeat name
integer
Page number for pagination (starts at 1)
string
Filter by status (paused, pending, up, down)
integer
Filter by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_IMPORT_DASHBOARDImport a dashboard from JSON configuration. Creates a new dashboard with the provided data structure

Input Parameters

string
required
The dashboard data as a JSON string (can be obtained from export_dashboard)
string
required
The name for the new dashboard
integer
required
The ID of the team to import the dashboard into (use teams to get team IDs)
Slug: BETTER_STACK_MCP_INCIDENTGet detailed information about a specific incident

Input Parameters

integer
required
The ID of the incident to retrieve
Slug: BETTER_STACK_MCP_INCIDENT_COMMENTSGet comments for an incident

Input Parameters

integer
required
The ID of the incident
Slug: BETTER_STACK_MCP_INCIDENTSList incidents with filtering and pagination options

Input Parameters

string
Return incidents until a specific date (ISO 8601 format)
string
Return incidents from a specific date (ISO 8601 format)
integer
Page number for pagination (starts at 1)
string
Filter by a substring of the incident cause (case-insensitive). Whitespace and dashes match flexibly.
array
Filter by current lifecycle status. Statuses are mutually exclusive: an incident is either ongoing, currently acknowledged (not yet resolved), or resolved. Pass an array to match any of them.
integer
Filter by team ID (use teams to get team IDs)
object
Filter by metadata key/value. Pass an object like { “severity”: “high” } or { “severity”: [“high”, “medium”] } for multi-value match.
integer
Number of results per page (default: 10, max: 50)
boolean
List only resolved incidents (true) or unresolved incidents (false). Independent of acknowledged_at — treats both states as separate timestamps. Use status for mutually-exclusive lifecycle filtering.
integer
Filter incidents for a specific monitor
boolean
List only acknowledged incidents (true) or unacknowledged incidents (false). Includes already-resolved incidents that were acknowledged at some point. Use status for mutually-exclusive lifecycle filtering.
boolean
true → only incidents with comments; false → only incidents without comments.
integer
Filter incidents for a specific heartbeat
boolean
true → only incidents linked to a Jira work item; false → only those without.
boolean
true → only incidents with a post-mortem comment; false → only those without.
boolean
true → only incidents linked to a Linear issue; false → only those without.
integer
Filter to incidents within a specific incident group. Discover group IDs by reading incident_group_id off an existing incident.
integer
Only incidents that lasted shorter than this many minutes.
integer
Only incidents that lasted longer than this many minutes.
array
Filter to incidents associated with any of these escalation policies (via the incident itself or its escalation events).
Slug: BETTER_STACK_MCP_INCIDENT_TIMELINEGet the timeline of events for an incident

Input Parameters

integer
required
The ID of the incident
Slug: BETTER_STACK_MCP_INVITE_TEAM_MEMBERInvite someone to a Better Stack team by e-mail address. Optionally set their role by system-role name (role: responder, member, team_lead, billing_admin) or by role_id (use team_roles to look up ids). Defaults to responder. The admin role cannot be assigned via the API. Someone who already belongs to the organization is added to the team directly, with no invitation to accept; the Admin role applies to every team, so an existing Admin keeps it. If the token can reach more than one team, pass team_id (or team_name).

Input Parameters

string
System-role name: responder, member, team_lead, or billing_admin. Defaults to responder. ‘admin’ is not allowed.
string
required
E-mail address of the person to invite.
integer
ID of the role to assign (alternative to role; supports custom roles). Use team_roles to look up ids.
integer
ID of the team to invite into. Required when the token can access more than one team.
string
Name of the team to invite into (alternative to team_id).
Slug: BETTER_STACK_MCP_METRICGet comprehensive details about a specific metric. Returns metric overview (data points, active series, available aggregations), definition (SQL expression or JSON path), example queries for different aggregation functions, and Prometheus tags (for pure metrics). Essential for understanding how to query and use a metric

Input Parameters

integer
required
The ID of the source
string
required
The name of the metric
Slug: BETTER_STACK_MCP_METRIC_EXPRESSIONSList the metric expressions (extract-metrics-from-logs rules) on a source. Returns the rule ID, name, kind (metric vs label), ClickHouse type, SQL expression, and aggregations. IDs use a short prefixed form that feeds straight into update_metric_expression / delete_metric_expression

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Number of results per page (default: 50, max: 250)
integer
required
The ID of the source (use sources to get source IDs)
Slug: BETTER_STACK_MCP_METRICS_QUERY_HELPGet instructions for building SQL ClickHouse queries for metrics (available metrics, aggregations, examples) to run directly via the query tools (query / render_chart), using concrete remote(...) / s3Cluster(...) collection names and explicit time filters.To instead write a query for use inside a Dashboard chart, use dashboard_query_help.Pass context: 'chart_query' when the query will be saved as a dashboard chart or chart alert — the prompt will emphasize {{source}} / {{time}} / {{start_time}} / {{end_time}} template variables and chart column aliases. (context: 'direct_query' is the default, for ad-hoc queries.)

Input Parameters

integer
required
The source ID
string ("direct_query" | "chart_query")
Where the query will run. ‘direct_query’ (default) — running directly via query or render_chart; prompt uses concrete remote()/s3Cluster() collection names and explicit time filters. ‘chart_query’ — query will be saved as a dashboard chart or chart alert; prompt uses {{source}}/{{time}}/{{start_time}}/{{end_time}} template variables throughout.
Slug: BETTER_STACK_MCP_METRICS_SCHEMAGet metrics and cardinality for a source. Returns a paginated table of available metrics (user-defined and ingested) ordered by active series (highest cardinality first), with their names, types, storage layout, data points count, and active series count. Use name_filter to search by name: rabbitmq*, *queue*, *_total, or an exact name. When more than 250 metrics match and grouping them by name prefix would shrink the list at least 3x, a prefix summary is returned instead of the list; drill in with the name_filter it suggests. page applies to whichever table is shown

Input Parameters

integer
required
The ID of the source
integer
Page number for pagination (starts at 1)
integer
Number of results per page (default: 50, max: 250)
string
Filter metrics by name. Supports wildcards: ‘rabbitmq*’ (starts with), ‘queue’ (contains), ’*_total’ (ends with), or an exact name. Case-insensitive
Slug: BETTER_STACK_MCP_MONITORGet details of a specific monitor

Input Parameters

integer
required
The ID of the monitor
Slug: BETTER_STACK_MCP_MONITOR_AVAILABILITYGet availability (SLA) summary for a specific monitor

Input Parameters

integer
required
The ID of the monitor
string
End date (YYYY-MM-DD format)
string
Start date (YYYY-MM-DD format)
Slug: BETTER_STACK_MCP_MONITOR_RESPONSE_TIMESGet response time metrics for a specific monitor

Input Parameters

integer
required
The ID of the monitor
Slug: BETTER_STACK_MCP_MONITORSList monitors with optional filtering and pagination

Input Parameters

string
Filter monitors by URL
integer
Page number for pagination (starts at 1)
integer
Filter by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
string
Filter monitors by name
Slug: BETTER_STACK_MCP_MOVE_CHARTSMove one or more charts to new positions on a dashboard. Validates the final layout for overlaps, allowing swaps and complex rearrangements. All moves are applied atomically - if any move is invalid, none are applied. Grid is 12 columns wide

Input Parameters

array
required
Array of chart moves
integer
required
The ID of the dashboard
Slug: BETTER_STACK_MCP_ON_CALLGet detailed information about a specific on-call calendar or the default calendar

Input Parameters

string
The ID of the on-call calendar (use “default” for team’s default calendar)
string
ISO-8601 formatted date/time to look up who is on-call at that time
Slug: BETTER_STACK_MCP_ON_CALL_EVENTGet detailed information about a specific on-call event

Input Parameters

integer
required
The ID of the event to retrieve
string
required
The ID of the on-call calendar (use “default” for team’s default calendar)
Slug: BETTER_STACK_MCP_ON_CALL_EVENTSList all on-call schedule events for a specific calendar

Input Parameters

string
required
The ID of the on-call calendar (use “default” for team’s default calendar)
Slug: BETTER_STACK_MCP_ON_CALL_ROTATIONGet on-call rotation configuration for a specific calendar

Input Parameters

string
required
The ID of the on-call calendar (use “default” for team’s default calendar)
Slug: BETTER_STACK_MCP_ON_CALLSList all on-call calendars for the team

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Filter by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_QUERYExecute a ClickHouse SQL query to retrieve logs, traces/spans, errors, and metrics from telemetry data.
  • IMPORANT: Use query_help to get instructions on how to create the correct query for logs and spans
  • IMPORANT: Use errors_query_help to get instructions on how to create the correct query for errors
  • IMPORANT: Use metrics_query_help to get instructions on how to create the correct query for metrics

Input Parameters

string
string
required
The SQL query to execute
string
required
Table name, ie. t123.my_source
string
string
number
required
Source ID
Slug: BETTER_STACK_MCP_QUERY_HELPGet instructions for building SQL ClickHouse queries for logs and spans (fields, aggregations, examples) to run directly via the query tools (query / render_chart) against the ClickHouse proxy. To instead write a query for use inside the Explore logs UI, use explore_logs_query_help.

Input Parameters

integer
required
The source ID
string ("logs" | "spans")
required
The type of source (logs or spans)
Slug: BETTER_STACK_MCP_RELEASESList all releases for a specific application in a paginated table format. Returns release ID (usable with remove_release), reference, environments, origin, first seen, and last seen timestamps

Input Parameters

integer
Page number for pagination (starts at 1)
string ("asc" | "desc")
Sort order: ‘asc’ or ‘desc’ (default: ‘desc’)
integer
Number of results per page (default: 50, max: 250)
integer
required
The ID of the application to list releases for
Slug: BETTER_STACK_MCP_REMOVE_CHARTRemove a chart from its dashboard permanently. This action cannot be undone and will also remove any alerts associated with the chart. Use dashboard first to find the chart ID

Input Parameters

integer
required
The ID of the chart to remove
Slug: BETTER_STACK_MCP_REMOVE_DASHBOARDRemove a dashboard permanently. This action cannot be undone

Input Parameters

integer
required
The ID of the dashboard to remove
Slug: BETTER_STACK_MCP_REMOVE_DASHBOARD_SECTIONRemove a section divider from a dashboard permanently. This action cannot be undone. Charts are not affected - only the section header is removed. Use dashboard first to find the section ID

Input Parameters

integer
required
The ID of the section to remove
Slug: BETTER_STACK_MCP_REMOVE_DASHBOARD_VARIABLERemove a dashboard template variable by name. Cannot remove the automatic variables source, start_time, end_time, or time. A chart still referencing a removed variable as a required {{name}} errors until it is redefined (the next chart save auto-creates it again, empty). Use dashboard first to see the defined variables.

Input Parameters

string
required
Name of the variable to remove
integer
required
The ID of the dashboard
Slug: BETTER_STACK_MCP_REMOVE_EXPLORATION_VARIABLERemove a variable from an exploration (saved Explore query) by name. Cannot remove the automatic variables source, start_time, end_time, or time. A query still referencing a removed variable as a required {{name}} errors until it is redefined. Use exploration first to see the defined variables.

Input Parameters

string
required
Name of the variable to remove
integer
required
The ID of the exploration
Slug: BETTER_STACK_MCP_REMOVE_RELEASERemove a release permanently. A release still receiving error events is re-detected automatically when its next event arrives. Use the releases tool to find release IDs

Input Parameters

integer
required
The ID of the release to remove (listed by the releases tool)
Slug: BETTER_STACK_MCP_REMOVE_STATUS_PAGE_RESOURCERemove a resource from a status page

Input Parameters

integer
required
The ID of the status page resource to remove (from status_page_resources)
integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_REMOVE_STATUS_PAGE_SECTIONRemove a section from a status page. Resources in the section are removed with it.

Input Parameters

integer
required
The ID of the section to remove (from status_page_sections)
integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_REMOVE_TEAM_MEMBERRemove a member from a Better Stack team, or cancel a pending invitation. Identify them by email or user_id (from team_members). Admins cannot be removed via the API, and the organization’s last member cannot be removed. If the token can reach more than one team, pass team_id (or team_name). This permanently removes the person’s access to the team.

Input Parameters

string
E-mail of the member to remove, or of a pending invitation to cancel (alternative to user_id).
integer
ID of the team to remove from. Required when the token can access more than one team.
integer
ID of the member to remove, or of a pending invitation to cancel — the id column from team_members (alternative to email).
string
Name of the team (alternative to team_id).
Slug: BETTER_STACK_MCP_RENDER_CHARTExecute a ClickHouse SQL query and visualize the result as a chart.Use chart_type to choose the visualization:
  • line (default) — trends over time. Alias columns as time, value, and optional series.
  • bar — magnitude over time or across buckets. Uses the same columns as line; set stacked: true to stack the series.
  • pie — share of a total across categories. Alias a categorical column AS series (the slice label) and a numeric column AS value (the slice size), e.g. SELECT service AS series, count() AS value FROM ... GROUP BY service.
Alias result columns as (line/bar):
  • ... AS time — the time bucket (e.g., toStartOfHour(dt) AS time)
  • ... AS value — the numeric metric (e.g., count() AS value)
  • ... AS series — optional: a grouping column for multiple series (e.g., service AS series)
IMPORTANT (line/bar): Always choose a time granularity that produces 50–500 data points — too few points make the chart useless, too many make it unreadable. Use these rules based on the query’s time range:
  • Up to 1 hour → toStartOfMinute(dt) AS time → ~60 points
  • 1–24 hours → toStartOfInterval(dt, INTERVAL 5 MINUTE) AS time → up to 288 points
  • 1–7 days → toStartOfHour(dt) AS time → up to 168 points
  • 7–30 days → toStartOfInterval(dt, INTERVAL 4 HOUR) AS time → up to 180 points
  • 30–90 days → toStartOfInterval(dt, INTERVAL 12 HOUR) AS time → up to 180 points
  • 90+ days → toStartOfDay(dt) AS time
Additional query instructions (data access patterns) are in:
  • query_help — logs and spans
  • errors_query_help — errors
  • metrics_query_help — metrics

Input Parameters

string
string
string
required
The SQL query to execute
string
required
Table name, ie. t123.my_source
boolean
Stack the series on top of each other. Applies to line and bar charts.
string
string
number
required
Source ID
string ("line" | "bar" | "pie")
How to visualize the result: line (trends over time, default), bar (magnitude over time or across buckets), or pie (share of a total across categories).
Slug: BETTER_STACK_MCP_REOPEN_INCIDENTReopen a resolved incident (must be within 24 hours of resolution)

Input Parameters

integer
required
The ID of the incident to reopen
string
User email or identifier of who reopened the incident. Optional - when omitted, the action is attributed to the authenticated OAuth user (or “API” for team/organisation API tokens). Only pass this if the user has explicitly told you who reopened the incident on their behalf.
Slug: BETTER_STACK_MCP_REPLAYS_QUERY_HELPGet comprehensive instructions for building SQL ClickHouse queries for session replays. Explains data structure, provides examples for listing replays, finding replays linked to errors, and filtering by user/environment

Input Parameters

integer
required
The application (source) ID
Slug: BETTER_STACK_MCP_RESOLVE_INCIDENTResolve an ongoing incident

Input Parameters

integer
required
The ID of the incident to resolve
string
User email or identifier of who resolved the incident. Optional - when omitted, the action is attributed to the authenticated OAuth user (or “API” for team/organisation API tokens). Only pass this if the user has explicitly told you who resolved the incident on their behalf.
Slug: BETTER_STACK_MCP_SET_DASHBOARD_VARIABLECreate or update a dashboard template variable — a user-facing filter in the dashboard toolbar, referenced in chart SQL as {{name}} (required — the chart errors until it resolves to a value) or [[ AND col = {{name}} ]] (optional — the whole [[ ... ]] clause is dropped while the variable is empty).Saving a chart auto-creates a plain text variable (or a source variable when the name contains ‘source’) for any undefined required {{name}}, but it starts empty — use this tool to give it a typed definition or a default value so the chart resolves without manual input.Fields per type:
  • select_value (shown as “Static list”) → the options in default_values (first = default selection)
  • select_with_sql (shown as “Dynamic list”) → an option-yielding expression (NOT a full query) in sql_definition, e.g. label('_host'); see the sql_definition parameter for how it is interpolated
  • Both list types accept allow_multiple_values: true to let users pick several options at once (interpolates as a regex used with match()). multi_select_with_sql is the legacy always-multiple Dynamic list; prefer select_with_sql with allow_multiple_values: true.
  • select_predefined_sql (shown as “Query per value”) → named SQL filters in filters (each a full query), default picked via selected_label
  • string / number / boolean → [default] in default_values
  • sql_expression → [raw SQL] in default_values, spliced into chart SQL unescaped
  • source → the source IDs in source_ids. Name it source to set the dashboard’s own source (which sources every chart queries by default), or use a custom name for an extra source variable that a chart references in its FROM (e.g. FROM {{name}}) to query a different set of sources than the dashboard default.
  • date / datetime → an ISO date in default_values, e.g. ['2026-07-23'] or ['2026-07-23T14:30:00Z']
SQL-backed types are validated at save time by running their SQL against the dashboard’s source — the save is refused when it fails.The names start_time, end_time, and time are reserved (they come from the time picker). source is the exception: set it as a source-type variable to change the dashboard’s source. Use dashboard to list a dashboard’s variables and dashboard_query_help for how each type is referenced in chart SQL.

Input Parameters

string
required
Variable name used as {{name}} in chart queries
array
select_predefined_sql: named SQL filters. Unlike sql_definition, each sql is a FULL query returning one column, whose rows are injected into the chart as an IN-list. Filter time with dt BETWEEN {{start_time}} AND {{end_time}}, never {{time}} (that macro only buckets inside charts). Example: SELECT label(‘cmd’) FROM {{source}} WHERE dt BETWEEN {{start_time}} AND {{end_time}} GROUP BY 1 ORDER BY count() DESC LIMIT 5.
array
source: the source IDs this variable resolves to (must be accessible to the dashboard’s team). Ignored for other types.
integer
required
The ID of the dashboard
string ("string" | "number" | "boolean" | "sql_expression" | "date" | "datetime" | "source" | "select_value" | "select_with_sql" | "multi_select_with_sql" | "select_predefined_sql")
required
The variable type
array
select_value: the options (first = default). string/number/boolean: [default]. sql_expression: [raw SQL]. date/datetime: [ISO date], e.g. [‘2026-07-23T14:30:00Z’].
string
select_predefined_sql: the default filter label.
string
select_with_sql / multi_select_with_sql: an expression (NOT a full query) yielding the option values — the platform interpolates it as SELECT DISTINCT <sql_definition> AS option FROM {{source}} WHERE dt BETWEEN {{start_time}} AND {{end_time}} LIMIT 50 to populate the dropdown. Example: label(‘_host’).
boolean
select_value / select_with_sql: let users pick several options at once; the variable then interpolates as a quoted regex used with match(), or as a parenthesised list when written straight after IN / NOT IN. Never IN ({{var}}), which keeps the regex and matches nothing. Ignored for other types.
Slug: BETTER_STACK_MCP_SET_EXPLORATION_VARIABLECreate or update a variable on an exploration (saved Explore query), referenced in its query as {{name}}.The most common use is setting the exploration’s source: name it source, type source, and pass the source IDs in source_ids — the query then runs against those sources.Fields per type:
  • source → the source IDs in source_ids. Name it source to set the exploration’s own source, or use a custom name for an extra source variable the query references in its FROM (e.g. FROM {{name}}).
  • select_value → the options in default_values (first = default selection)
  • select_with_sql / multi_select_with_sql → an option-yielding expression (NOT a full query) in sql_definition, e.g. label('_host')
  • select_predefined_sql → named SQL filters in filters (each a full query), default picked via selected_label
  • string / number / boolean → [default] in default_values
  • sql_expression → [raw SQL] in default_values, spliced into the query unescaped
  • date / datetime → an ISO date in default_values, e.g. ['2026-07-23'] or ['2026-07-23T14:30:00Z']
SQL-backed types are validated at save time by running their SQL against the exploration’s source — the save is refused when it fails.The names start_time, end_time, and time are reserved (they come from the time picker). source is the exception: set it as a source-type variable to change the exploration’s source. Use exploration to list an exploration’s variables.

Input Parameters

string
required
Variable name used as {{name}} in the query. Use ‘source’ to set the exploration’s own source.
array
select_predefined_sql: named SQL filters. Each sql is a FULL query returning one column, whose rows are injected as an IN-list. Filter time with dt BETWEEN {{start_time}} AND {{end_time}}.
array
source: the source IDs this variable resolves to (must be accessible to the exploration’s team). Ignored for other types.
string ("string" | "number" | "boolean" | "sql_expression" | "date" | "datetime" | "source" | "select_value" | "select_with_sql" | "multi_select_with_sql" | "select_predefined_sql")
required
The variable type
array
select_value: the options (first = default). string/number/boolean: [default]. sql_expression: [raw SQL]. date/datetime: [ISO date], e.g. [‘2026-07-23T14:30:00Z’].
integer
required
The ID of the exploration
string
select_predefined_sql: the default filter label.
string
select_with_sql / multi_select_with_sql: an expression (NOT a full query) yielding the option values — the platform interpolates it as SELECT DISTINCT <sql_definition> AS option FROM {{source}} WHERE dt BETWEEN {{start_time}} AND {{end_time}} LIMIT 50. Example: label(‘_host’).
Slug: BETTER_STACK_MCP_SEVERITIESList all severities (urgency levels) with their notification settings

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Filter by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_SEVERITYGet detailed information about a specific severity (urgency level)

Input Parameters

integer
required
The ID of the severity
Slug: BETTER_STACK_MCP_SOURCEGet comprehensive details of a specific source including its configuration, retention settings, ingestion details, custom bucket settings (if configured)

Input Parameters

integer
required
The ID of the source
Slug: BETTER_STACK_MCP_SOURCE_FIELDSGet complete field catalog for a logs or spans source. Returns a table of all queryable fields with their paths and data types. Essential for understanding what fields can be queried for building custom queries

Input Parameters

integer
required
The ID of the source
string ("logs" | "spans")
Type of source data to query (default: logs)
Slug: BETTER_STACK_MCP_SOURCESList all available sources in a paginated table format. Returns source ID, name, platform type, team, status (active/paused), data region, and creation date

Input Parameters

string
Filter sources by name (case-insensitive partial match)
integer
Page number for pagination (starts at 1)
integer
Filter sources by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_STATUS_PAGEGet details of a specific status page

Input Parameters

integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_STATUS_PAGE_REPORTSList status reports (incidents/maintenance) for a specific status page

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Filter by team ID (use teams to get team IDs)
integer
Number of results per page (default: 50, max: 250)
integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_STATUS_PAGE_REPORT_UPDATEGet details of a specific status page report update

Input Parameters

integer
required
The ID of the status report
integer
required
The ID of the status update
integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_STATUS_PAGE_REPORT_UPDATESList status updates for a specific status report

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Number of results per page (default: 50, max: 250)
integer
required
The ID of the status report
integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_STATUS_PAGE_RESOURCESGet resources (monitors/heartbeats) for a specific status page

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Number of results per page (default: 50, max: 250)
integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_STATUS_PAGESList all status pages with filtering and pagination options

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Number of results per page (default: 50, max: 250)
Slug: BETTER_STACK_MCP_STATUS_PAGE_SECTIONSList the sections (resource groups) of a status page

Input Parameters

integer
Page number for pagination (starts at 1)
integer
Number of results per page (default: 50, max: 250)
integer
required
The ID of the status page
Slug: BETTER_STACK_MCP_TEAM_MEMBERSList the members of a Better Stack team, including pending invitations. Returns each member’s email, name, role and the mobile app platforms they have signed in on. Supports the same email filter and pagination as the REST team-members API. If the token can reach more than one team, pass team_id (or team_name) to pick one; call it without a team first to see the list of accessible teams. Useful for auditing who has access — e.g. offboarding.

Input Parameters

integer
Page number (1-based). Defaults to 1.
string
Return only the member or pending invitation with this exact email address.
integer
ID of the team to list members for. Required when the token can access more than one team.
integer
Results per page. Defaults to 50, maximum 250.
string
Name of the team to list members for (alternative to team_id).
Slug: BETTER_STACK_MCP_TEAM_ROLESList the roles defined in a Better Stack organization, including their role_id and system-role identifier (admin, billing_admin, team_lead, responder, member, or “custom”). Use this to discover valid role_id values for interpreting team member roles. If the token can reach more than one team/organization, pass team_id (or team_name) to choose one.

Input Parameters

integer
ID of a team in the target organization. Required when the token can access more than one team.
string
Name of a team in the target organization (alternative to team_id).
Slug: BETTER_STACK_MCP_TEAMSList all available teams in Better Stack Logs. Returns a table with team IDs and names, grouped by organization

Input Parameters

string
Filter teams by name (case-insensitive partial match)
Slug: BETTER_STACK_MCP_TOGGLE_CHART_ALERT_PAUSEPause or unpause a chart alert. When paused, the alert will not trigger any incidents

Input Parameters

integer
required
The ID of the chart alert
boolean
required
Set to true to pause, false to unpause
Slug: BETTER_STACK_MCP_UPDATE_ERROR_STATEUpdate the state of a specific error (mark as resolved, ignored, or unresolved)

Input Parameters

string ("ignored" | "resolved" | "unresolved")
required
The target state
string
required
The error pattern identifier
integer
required
The ID of the application
integer ("1" | "10" | "100" | "1000")
Number of next occurrences to ignore (only valid when state is ‘ignored’). Must be 1, 10, 100, or 1000
string ("current")
Pin the resolution to the application’s latest release. The error will only re-open if it appears in a strictly newer release. Only valid when state is ‘resolved’.
boolean
Whether to notify for every occurrence of this error
Slug: BETTER_STACK_MCP_UPDATE_METRIC_EXPRESSIONUpdate an existing metric expression. Call metric_expressions first to get the ID.At least one of name, sql_expression, type, aggregations must be provided — build_type alone is not a change and will be rejected. See create_metric_expression for sql_expression / type / aggregations guidance.Prefer build_type: new_data (default). historical_logs re-runs the rule over every stored log — expensive; only when the user explicitly asks.

Input Parameters

string
required
The metric expression ID returned by metric_expressions, e.g. “m-123” or “g-456”
string
New metric name. Letters, numbers, and underscores only
string ("string" | "string_low_cardinality" | "int64_delta" | "int64" | "uint64_delta" | "uint64" | "float64_delta" | "datetime64_delta" | "boolean")
New ClickHouse storage type
integer
required
The ID of the source (use sources to get source IDs)
string ("new_data" | "historical_logs")
How to process existing data: ‘new_data’ (default) only applies to new logs; ‘historical_logs’ rebuilds metrics from existing logs
array
New set of aggregations. Pass [] to convert to a label (group-by column)
string
New ClickHouse SQL expression
Slug: BETTER_STACK_MCP_UPDATE_STATUS_PAGEUpdate the settings of a status page (company name, contact URL, theme, layout, and more)

Input Parameters

integer
required
The ID of the status page
string ("light" | "dark" | "system")
Color theme
string ("vertical" | "horizontal")
Resource layout
string
Timezone used to display times (e.g. “Europe/Prague”)
boolean
Whether the status page is published (publicly visible)
string
Subdomain the page is served on (e.g. “acme” for acme.betteruptime.com)
string
URL the company name links to
string
URL or mailto link for the contact/support button
string
Announcement banner text shown at the top of the page
string
Company name shown as the status page title
boolean
Whether visitors can subscribe to updates
string
Custom CNAME domain for the status page
boolean
Hide the status page from search engines
Slug: BETTER_STACK_MCP_UPDATE_STATUS_PAGE_RESOURCEUpdate a resource on a status page.Change its public name, description, widget type (e.g. show or hide the uptime history), or move it by setting position (zero-based) and/or status_page_section_id. Use status_page_resources to find resource IDs.

Input Parameters

integer
Zero-based position of the resource within its section
string
Description shown under the resource
string
Name shown to visitors
integer
required
The ID of the status page resource to update (from status_page_resources)
string ("plain" | "history" | "intraday_history" | "response_times" | "intraday_response_times" | "chart_only")
How the resource is displayed. “history” shows the daily uptime bar, “plain” hides it.
integer
required
The ID of the status page
integer
Move the resource to this section (use status_page_sections to list them)
Slug: BETTER_STACK_MCP_UPDATE_STATUS_PAGE_SECTIONRename a status page section or move it by setting its position

Input Parameters

string
The section heading shown to visitors
integer
Zero-based position of the section on the status page
integer
required
The ID of the section to update (from status_page_sections)
integer
required
The ID of the status page