Skip to content

v0.2.0 - expanded alert rule tool support#20

Merged
SeaBlooms merged 4 commits into
mainfrom
TD-8323
May 6, 2026
Merged

v0.2.0 - expanded alert rule tool support#20
SeaBlooms merged 4 commits into
mainfrom
TD-8323

Conversation

@SeaBlooms
Copy link
Copy Markdown
Contributor

@SeaBlooms SeaBlooms commented May 4, 2026

Summary

Fixes alert rule MCP tool schema gaps that prevented rule updates/renames and adds missing action type support. Addresses TD-8323.

Fixes

  • version field: Added to update-inline-question-rule schema and handler — previously the API rejected all updates with "version not provided"
  • Webhook action fields: Added method, endpoint, headers to the action schema — previously stripped on update, silently breaking webhook configs
  • Webhook body type: Changed from z.string() to z.union([z.string(), z.record(z.any())]) to support object bodies

New Features

  • FOR_EACH_ITEM action: Supports items, itemRef, and recursive nested actions via z.lazy() schema
  • SEND_SLACK_MESSAGE action: Added channels field support
  • CREATE_JIRA_TICKET auto-resolve: Added autoResolve and resolvedStatus fields
  • Shared action schema: Extracted a single recursive actionSchema using z.lazy(), replacing duplicated inline schemas in create and update tools
  • Expanded update mutation return fields: UPDATE_INLINE_QUESTION_RULE now returns the full field set (matching the create mutation)

Not Included

  • delete-rule tool: Removed per policy — the J1 MCP server will not support destructive operations

Files Changed

  • src/server/mcp-server.ts — Shared action schema, version field support
  • src/types/jupiterone.ts — Added version, autoResolve, resolvedStatus, items, itemRef, actions to types
  • src/client/graphql/mutations.ts — Expanded update mutation return fields
  • src/descriptions/create-inline-question-rule.md — FOR_EACH_ITEM and Jira auto-resolve docs
  • src/descriptions/update-inline-question-rule.md — FOR_EACH_ITEM and Jira auto-resolve docs
  • src/generated/description-map.ts — Regenerated

Test Plan

All tests executed against the j1dev account using a local MCP server build on branch TD-8323:

  • Rule rename via update (version field + webhook field preservation)
  • Create rule with SEND_SLACK_MESSAGE action (schema validated; API requires real Slack integration)
  • Create rule with FOR_EACH_ITEM + nested CREATE_JIRA_TICKET with autoResolve/resolvedStatus
  • Update existing rule to add FOR_EACH_ITEM with nested SEND_EMAIL; version increment verified
  • Create rule with WEBHOOK action (method, endpoint, headers, object body)
  • Expanded update mutation return fields verified (resourceGroupId, labels, latestAlertId, remediationSteps, etc.)
  • Cleanup: all test rules deleted from j1dev

@SeaBlooms SeaBlooms changed the title expanded alert rule tool support, added delete-rule tool, tested all updates v0.2.0 - expanded alert rule tool support, added delete-rule tool, tested all updates May 4, 2026
bjoepfeiffer
bjoepfeiffer previously approved these changes May 5, 2026
Per policy decision, the J1 MCP server will not support
destructive operations. Removed the delete-rule tool
registration and its description file.

Co-authored-by: Cursor <cursoragent@cursor.com>
@SeaBlooms SeaBlooms changed the title v0.2.0 - expanded alert rule tool support, added delete-rule tool, tested all updates v0.2.0 - expanded alert rule tool support May 5, 2026
@SeaBlooms SeaBlooms requested a review from bjoepfeiffer May 5, 2026 20:07
@SeaBlooms SeaBlooms merged commit 7c566a2 into main May 6, 2026
4 checks passed
@SeaBlooms SeaBlooms deleted the TD-8323 branch May 6, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants