Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

23.5 KB
Raw Blame
# MCP tool definitions. Tools are opt-in: an operation is exposed only when it has an entry here.
# List operations without an entry: pnpm --filter=@posthog/mcp run scaffold-yaml -- --candidates --product error_tracking
# Add one: pnpm --filter=@posthog/mcp run scaffold-yaml -- --add <operationId> --product error_tracking
# To keep an operation off on purpose, set enabled: false and give a disabled_reason.
category: Error tracking
feature: error_tracking
url_prefix: /error-tracking
ui_apps:
    error-details:
        type: detail
        view_prop: data
    error-issue:
        type: detail
        view_prop: issue
    error-issue-list:
        type: list
        detail_tool: query-error-tracking-issue
        detail_args: '{ issueId: item.id }'
        click_prop: onIssueClick
tools:
    error-tracking-assignment-rules-create:
        operation: error_tracking_assignment_rules_create
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: false
        title: Create error tracking assignment rule
        description: >
            Create an error tracking assignment rule for the current project. Provide `filters` to match incoming errors
            and an `assignee` with `type` (`user` or `role`) plus the matching user ID or role UUID.
    error-tracking-assignment-rules-list:
        operation: error_tracking_assignment_rules_list
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: List error tracking assignment rules
        description: >
            List error tracking assignment rules for the current project. Returns rules in evaluation order with their
            filters, assignee, and disabled state. Supports pagination with `limit` and `offset`.
    error-tracking-bypass-rules-create:
        operation: error_tracking_bypass_rules_create
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: false
        title: Create error tracking bypass rule
        description: >
            Create a rate limit bypass rule for the current project. Exception events matching the rule skip both the
            project-wide and per-issue exception rate limits and are always ingested. Provide `filters` with at least
            one condition — empty match-all rules are rejected; to stop rate limiting entirely, update the rate limits
            via error-tracking-settings-update instead. Keep filters scoped to the specific errors that must never be
            dropped: bypassed events are ingested and billed even during error spikes, so a broad rule can cause
            unbounded volume.
    error-tracking-bypass-rules-list:
        operation: error_tracking_bypass_rules_list
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: List error tracking bypass rules
        description: >
            List rate limit bypass rules for the current project. Exception events matching a rule skip the project-wide
            and per-issue exception rate limits. Returns rules in evaluation order with their filters and disabled
            state. Supports pagination with `limit` and `offset`.
    error-tracking-bypass-rules-update:
        operation: error_tracking_bypass_rules_update
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: true
        title: Update error tracking bypass rule
        description: >
            Update a rate limit bypass rule's `filters` by ID. Omit `filters` to leave them unchanged. Editing the rule
            also clears any auto-disable state so the rule is re-enabled. Broadening filters exempts more exception
            events from rate limiting, which can increase ingested (and billed) volume during error spikes — keep them
            scoped to the specific errors that must never be dropped.
    error-tracking-external-references-create:
        operation: error_tracking_external_references_create
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: false
        title: Create error tracking external reference
        description: >
            Create a new external issue in GitHub, GitLab, Linear, or Jira, then link it to a PostHog error tracking
            issue as an external reference. This tool does not link an existing external issue by URL or key. Provide
            the error tracking issue id as `issue`, the connected integration as `integration_id`, and a `config` object
            with provider-specific fields. Examples: Jira config {"project_key":"ENG","title":"Checkout
            TypeError","description":"Stack trace and reproduction details"}; Linear config
            {"team_id":"team-id","title":"Checkout TypeError","description":"Stack trace and reproduction details"};
            GitHub config {"repository":"posthog","title":"Checkout TypeError","body":"Stack trace and reproduction
            details"}; GitLab config {"title":"Checkout TypeError","body":"Stack trace and reproduction details"}.
            Required `config` keys by integration kind: github -> {repository, title, body}; gitlab -> {title, body};
            linear -> {team_id, title, description}; jira -> {project_key, title, description}. Every kind also accepts
            an optional `assignee` key: a Linear user ID, a GitHub login, a GitLab user ID, or a Jira account ID. Use
            integrations-list first to find the `integration_id` and kind; use integrations-jira-projects-retrieve,
            integrations-linear-teams-retrieve, or integrations-github-repos-retrieve when you need provider-specific
            IDs.
    error-tracking-grouping-rules-create:
        operation: error_tracking_grouping_rules_create
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: false
        title: Create error tracking grouping rule
        description: >
            Create an error tracking grouping rule for the current project. Provide required `filters`, and optionally
            set `assignee` and `description` for the issues this rule creates.
    error-tracking-grouping-rules-list:
        operation: error_tracking_grouping_rules_list
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: List error tracking grouping rules
        description: >
            List error tracking grouping rules for the current project. Returns rules in evaluation order with their
            filters, optional assignee, description, and linked issue when available.
    error-tracking-grouping-rules-update:
        operation: error_tracking_grouping_rules_update
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Update error tracking grouping rule
        description: >
            Update an error tracking grouping rule's `filters` by ID. Omit `filters` to leave them unchanged. Editing
            the rule also clears any auto-disable state so the rule is re-enabled.
    error-tracking-issues-assign-partial-update:
        operation: error_tracking_issues_assign_partial_update
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Assign error tracking issue
        description: >
            Assign an error tracking issue to an organization member or role. Provide the issue ID as `id` and set
            `assignee` to a user with a numeric ID or a role with a UUID. Set `assignee` to null to remove the current
            assignment.
    error-tracking-issues-list:
        operation: error_tracking_issues_list
        enabled: false
        disabled_reason: Superseded by query-error-tracking-issues-list
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        enrich_url: '{id}'
        list: true
        title: List error tracking issues
        description: >
            List all error tracking issues in the project. Returns issues with id, status, name, first seen timestamp,
            and assignee info.
        ui_app: error-issue-list
        response:
            include:
                - id
                - status
                - name
                - first_seen
                - assignee
    error-tracking-issues-merge-create:
        operation: error_tracking_issues_merge_create
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: false
        title: Merge error tracking issues
        description: >
            Merge one or more error tracking issues into an existing target issue. Provide the target issue as `id` and
            the issues to merge into it as `ids`.
    error-tracking-issues-partial-update:
        operation: error_tracking_issues_partial_update
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        enrich_url: '{id}'
        title: Update error tracking issue
        description: >
            Update an error tracking issue's status, severity, name, or description. Use
            `error-tracking-issues-assign-partial-update` to change its assignee.
        ui_app: error-issue
    error-tracking-issues-retrieve:
        operation: error_tracking_issues_retrieve
        enabled: false
        disabled_reason: Superseded by query-error-tracking-issue
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        enrich_url: '{id}'
        title: Get error tracking issue
        description: >
            Get a specific error tracking issue by ID. Returns full issue details including status, description, volume,
            and metadata. After retrieving an issue, consider using `query-session-recordings-list` with an event filter
            for `$exception` to find session recordings of users who hit this error.
        ui_app: error-issue
    error-tracking-issues-split-create:
        operation: error_tracking_issues_split_create
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: false
        title: Split error tracking issue fingerprints
        description: >
            Split one or more fingerprints out of an existing error tracking issue into new issues. Provide the source
            issue as `id` and the fingerprints to split as `fingerprints`, where each entry includes a required
            `fingerprint` and optional `name` or `description`.
    error-tracking-recommendations-list:
        operation: error_tracking_recommendations_list
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: List error tracking recommendations
        description_file: ./prompts/error-tracking-recommendations-list.md
        system_prompt_hint: Error tracking setup recommendations and how to act on each (error-tracking category)
    error-tracking-settings-get:
        operation: error_tracking_settings_retrieve_settings_retrieve
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Get error tracking settings
        description: >
            Get the error tracking ingestion settings for the current project. Returns `ingestion_enabled`, which is
            false when ingestion drops every exception the project sends, and the project-wide and per-issue exception
            rate limits, where each `*_rate_limit_value` is the maximum events ingested per bucket and each
            `*_rate_limit_bucket_size_minutes` is the bucket window. A null `*_rate_limit_value` means no limit is set.
            Read these before updating so you can preserve the fields you don't intend to change.
    error-tracking-settings-update:
        operation: error_tracking_settings_update_settings_partial_update
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: true
        title: Update error tracking settings
        description: >
            Update the error tracking ingestion settings for the current project. Only the fields you include are
            applied; omitted fields keep their existing values. Use this to set the project-wide rate limit
            (`project_rate_limit_value` events per `project_rate_limit_bucket_size_minutes`) and the per-issue rate
            limit (`per_issue_rate_limit_value` events per `per_issue_rate_limit_bucket_size_minutes`). Set a
            `*_rate_limit_value` to null to remove that limit. WARNING: exception events above a rate limit are dropped
            at ingestion and cannot be recovered. Lowering a limit silently discards volume — confirm the threshold with
            the user before reducing it. Setting `ingestion_enabled` to false drops every exception the project sends,
            within about a minute, until it is set back to true. Only change it when the user explicitly asks to stop or
            resume exception ingestion.
    error-tracking-severity-rules-create:
        operation: error_tracking_severity_rules_create
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: false
        title: Create error tracking severity rule
        description: >
            Create an error tracking severity rule for the current project. Provide `filters` and the `severity` to
            assign when a newly created issue first matches this rule. Supported severities are `low`, `medium`, `high`,
            and `critical`. Use `order_key` to set the evaluation priority. Lower values run first, and only the first
            matching rule applies. Rules do not change existing issues.
    error-tracking-severity-rules-list:
        operation: error_tracking_severity_rules_list
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: List error tracking severity rules
        description: >
            List error tracking severity rules for the current project. Returns rules in evaluation order with their
            filters, assigned severity, order key, and disabled state. Read the existing rules before creating or
            updating one because only the first matching rule applies.
    error-tracking-severity-rules-update:
        operation: error_tracking_severity_rules_update
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: false
            idempotent: true
        title: Update error tracking severity rule
        description: >
            Update an error tracking severity rule by ID. Include `filters`, `severity`, or both. Omitted fields keep
            their existing values. Supported severities are `low`, `medium`, `high`, and `critical`. Updating filters
            recompiles the rule and clears any auto-disable state. Changes apply only to issues created after the
            update.
    error-tracking-suppression-rules-create:
        operation: error_tracking_suppression_rules_create
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: false
        title: Create error tracking suppression rule
        description: >
            Create an error tracking suppression rule for the current project. WARNING: matching errors are suppressed
            indefinitely — dropped at ingestion and will not appear as issues until the rule is disabled or deleted.
            Scope `filters` tightly to the exact exception type, message, URL, or properties you want gone. Do NOT
            create match-all rules (omitting `filters`) or broad rules — they silently swallow unrelated errors and
            cause data loss that is hard to detect after the fact. If unsure, set `sampling_rate` below `1.0` so only a
            fraction of matches are dropped (e.g. `0.5` drops half) rather than all of them. Confirm with the user
            before creating any rule that could match more than one distinct error.
    error-tracking-suppression-rules-list:
        operation: error_tracking_suppression_rules_list
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: List error tracking suppression rules
        description: >
            List error tracking suppression rules for the current project. Returns rules in evaluation order with their
            filters, sampling rate, and disabled state. Supports pagination with `limit` and `offset`.
    error-tracking-suppression-rules-update:
        operation: error_tracking_suppression_rules_update
        enabled: true
        scopes:
            - error_tracking:write
        annotations:
            readOnly: false
            destructive: true
            idempotent: true
        title: Update error tracking suppression rule
        description: >
            Update an error tracking suppression rule by ID. Only the fields you include in the request body are
            applied; omitted fields keep their existing values. Supports updating `filters` and `sampling_rate`.
            WARNING: broadening `filters` will start dropping additional events at ingestion silently. Keep filters
            tightly scoped to the exact errors you want gone. Prefer raising `sampling_rate` to dampen volume over
            widening the match. Confirm with the user before changing a rule's filters in a way that could match more
            than one distinct error.
    error-tracking-symbol-sets-download-retrieve:
        operation: error_tracking_symbol_sets_download_retrieve
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Download error tracking symbol set
        description: >
            Get a presigned download URL for a source map symbol set by ID. The URL expires after one hour. Use it
            immediately, and do not echo it back unless the user explicitly asks. If you only have a symbol set
            reference, call `error-tracking-symbol-sets-list` with the exact `ref` first.
    error-tracking-symbol-sets-list:
        operation: error_tracking_symbol_sets_list
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        list: true
        title: List error tracking symbol sets
        description: >
            List source map symbol sets for the current project. Supports pagination plus filtering by exact `ref` or
            upload `status` (`valid`, `invalid`, or `all`) and sorting with `order_by`. Each result includes
            `has_uploaded_file` so you can tell whether the download tool will work.
        response:
            include:
                - id
                - ref
                - created_at
                - last_used
                - failure_reason
                - has_uploaded_file
                - release
    error-tracking-symbol-sets-retrieve:
        operation: error_tracking_symbol_sets_retrieve
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        title: Get error tracking symbol set
        description: >
            Get a source map symbol set by ID. If you only have a symbol set reference, call
            `error-tracking-symbol-sets-list` with the exact `ref` first.
        response:
            include:
                - id
                - ref
                - created_at
                - last_used
                - failure_reason
                - has_uploaded_file
                - release
    query-error-tracking-issue:
        operation: error_tracking_query_issue_create
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        enrich_url: '{params.issueId}'
        title: Query error tracking issue
        description_file: ./prompts/query-error-tracking-issue.md
        system_prompt_hint: Error issue details and impact (error-tracking category)
        ui_app: error-issue
    query-error-tracking-issue-events:
        operation: error_tracking_query_issue_events_create
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        enrich_url: '{params.issueId}'
        title: Query error tracking issue events
        description_file: ./prompts/query-error-tracking-issue-events.md
        system_prompt_hint: Error event samples, stack traces, code variables, and session IDs (error-tracking category)
        ui_app: error-details
    query-error-tracking-issues-list:
        operation: error_tracking_query_issues_list_create
        enabled: true
        scopes:
            - error_tracking:read
        annotations:
            readOnly: true
            destructive: false
            idempotent: true
        enrich_url: '{id}'
        list: true
        title: Query error tracking issues list
        description_file: ./prompts/query-error-tracking-issues-list.md
        system_prompt_hint: Error issue filtering and aggregation (error-tracking category)
        ui_app: error-issue-list
        response:
            include:
                - id
                - name
                - description
                - status
                - severity
                - first_seen
                - last_seen
                - library
                - source
                - assignee
                - aggregations
            text_include:
                - id
                - name
                - status
                - severity
                - first_seen
                - last_seen
                - aggregations.occurrences
                - aggregations.users
                - aggregations.sessions
                - _posthogUrl