Skip to content

feat(error-tracking): add severity rule MCP tools - #87881

Merged
trunk-io[bot] merged 6 commits into
masterfrom
posthog/enable-error-severity-rule-mcp-tools
Aug 27, 2026
Merged

trunk-io[bot] merged 6 commits into
masterfrom
posthog/enable-error-severity-rule-mcp-tools

Conversation

@hpouillot

Copy link
Copy Markdown
Contributor

Problem

MCP users can set issue severity manually, but they cannot create or update automatic severity rules.

Changes

  • MCP users can now list, create, and update Error tracking severity rules.
  • Tool guidance explains first-match ordering, accepted severities, and new-issue-only behavior.
  • Generated handlers, metadata, schemas, and snapshots keep the MCP catalog in sync.

How did you test this code?

  • Ran the MCP type checker, formatter, linter, and tool-name validator.
  • Ran the tool generation, schema snapshot, catalog, filtering, and search unit tests.
  • Added integration coverage for create, update, and list behavior. The integration environment was not configured, so this test did not run locally.

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Automatic notifications

  • Publish to changelog?

Docs update

The generated tool descriptions document the supported inputs and severity-rule behavior. No separate product docs changed.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

OpenAI GPT-5.6 Sol used pi, GitHub CLI, and PostHog MCP tooling. The work invoked /implementing-mcp-tools, /writing-user-facing-copy, /writing-tests, /writing-code-comments, and /writing-pr-descriptions.

The change also exposes list access so agents can inspect ordered rules before creating or updating one. Delete and reorder operations remain outside this scope.

Expose list, create, and update operations for error tracking severity rules through the PostHog MCP server.

Generated-By: PostHog Desktop
Task-Id: 12089906-88c9-4363-aa68-4705d0f4c5f4
@hpouillot hpouillot self-assigned this Aug 24, 2026
@trunk-io

trunk-io Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

😎 Merged successfully - details.

@github-actions

Copy link
Copy Markdown
Contributor

Hey @hpouillot! 👋

It looks like your git author email on this PR isn't your @posthog.com address (hpouillot@gmail.com). Since you're on the PostHog team, it's worth pointing your local git author email at your @posthog.com address. Why it matters:

  • Consistent work identity in git history — internal tooling that attributes commits to team members keys off your @posthog.com address.
  • Keeps team contributions easy to tell apart from external community ones when scanning history.

You can fix it for this repo with:

git config user.email "you@posthog.com"

Or set it globally with git config --global user.email "you@posthog.com". No need to redo this PR — just a nudge for next time. 🙂

@hpouillot hpouillot added the skip-inkeep-docs Use this label to skip an Inkeep docs PR in posthog.com label Aug 24, 2026 — with PostHog
@github-actions

github-actions Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

ℹ️ MCP UI apps size — 33 app(s), 17662.6 KB JS

Built size of each MCP UI app (main.js + styles.css).

App JS CSS
debug 600.0 KB 195.2 KB
action 458.2 KB 195.2 KB
action-list 564.9 KB 195.2 KB
cohort 457.2 KB 195.2 KB
cohort-list 563.8 KB 195.2 KB
email-template 457.0 KB 195.2 KB
error-details 472.9 KB 195.2 KB
error-issue 457.9 KB 195.2 KB
error-issue-list 564.7 KB 195.2 KB
experiment 562.0 KB 195.2 KB
experiment-list 565.6 KB 195.2 KB
experiment-results 567.1 KB 195.2 KB
feature-flag 567.6 KB 195.2 KB
feature-flag-list 571.4 KB 195.2 KB
feature-flag-testing 461.4 KB 195.2 KB
inline-scan 457.7 KB 195.2 KB
insight-actors 563.0 KB 195.2 KB
invite-email-preview 456.4 KB 195.2 KB
llm-costs 560.0 KB 195.2 KB
session-recording 459.0 KB 195.2 KB
survey 458.8 KB 195.2 KB
survey-global-stats 562.7 KB 195.2 KB
survey-list 565.5 KB 195.2 KB
survey-stats 562.7 KB 195.2 KB
trace-span 457.6 KB 195.2 KB
trace-span-list 564.7 KB 195.2 KB
vision-observation-list 563.9 KB 195.2 KB
workflow 457.5 KB 195.2 KB
workflow-list 564.2 KB 195.2 KB
loops-review 461.9 KB 195.2 KB
query-results 755.0 KB 195.2 KB
render-ui 838.1 KB 195.2 KB
visual-review-snapshots 462.0 KB 195.2 KB

@hpouillot
hpouillot requested review from a team, ablaszkiewicz and cat-ph August 24, 2026 14:53
@hpouillot
hpouillot marked this pull request as ready for review August 24, 2026 14:54
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team August 24, 2026 14:55
@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(error-tracking): add severity rule ..." | Re-trigger Greptile

@trunk-io

trunk-io Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

View Full Report ↗︎ ⋅ Docs

hpouillot and others added 5 commits August 25, 2026 15:37
Validate that each affected tool remains reachable through the compact domain index instead of requiring one exact domain spelling.

Generated-By: PostHog Desktop
Task-Id: bc15d8bc-972e-4aea-8ad5-bebb38b8b6b1
Regenerate the MCP tool-schema snapshots after the generated error tracking API gained behavioral filters.

Generated-By: PostHog Desktop
Task-Id: 7c8792a2-2d15-4047-9067-ca7fb2c72e8f
@trunk-io
trunk-io Bot merged commit d007f2c into master Aug 27, 2026
199 checks passed
@trunk-io
trunk-io Bot deleted the posthog/enable-error-severity-rule-mcp-tools branch August 27, 2026 09:59
@deployment-status-posthog

deployment-status-posthog Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-08-27 10:28 UTC Run
prod-us ✅ Deployed 2026-08-27 10:52 UTC Run
prod-eu ✅ Deployed 2026-08-27 10:53 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-inkeep-docs Use this label to skip an Inkeep docs PR in posthog.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants