Skip to content

rust(feat): preview_rule MCP tool - #738

Open
evan-sift wants to merge 4 commits into
rust/mcp-calculated-channel-datafrom
rust/mcp-preview-rule
Open

rust(feat): preview_rule MCP tool#738
evan-sift wants to merge 4 commits into
rust/mcp-calculated-channel-datafrom
rust/mcp-preview-rule

Conversation

@evan-sift

@evan-sift evan-sift commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds preview_rule: a dry run of a rule against a run that persists nothing. It accepts a saved rule (rule_id or rule_name, resolved through the existing rules service, considering only active rules) or an ad-hoc draft_rule_config JSON string; the two are mutually exclusive. Read-only, so it needs no write-mode flags.

Surface note: preview_rule is an action, not a resource; the list / create / update / archive quartet does not apply.

Stack note: the bundled agent skill and the 0.5.0 changelog for this whole stack land at the tip (#763).

Verification

  • cargo test -p sift_mcp on this branch: 363 passed, 0 failed (saved vs draft request construction, both mutual-exclusion directions, malformed draft JSON, name resolution, error propagation, result shape, archived-name exclusion).
  • MCP protocol check: tool registered, live list_rules round trip.
  • Agent tool-selection gates pass: both a saved-rule and a draft-rule prompt chose preview_rule over create_report / create_rule.

@evan-sift evan-sift changed the title rust/mcp preview rule rust(feat): preview_rule MCP tool Aug 19, 2026
@evan-sift
evan-sift force-pushed the rust/mcp-calculated-channel-data branch from 3c4c477 to ce38cc5 Compare August 26, 2026 07:55
@evan-sift
evan-sift force-pushed the rust/mcp-preview-rule branch from 505de4d to c49576a Compare August 26, 2026 07:56
@evan-sift
evan-sift force-pushed the rust/mcp-calculated-channel-data branch from ce38cc5 to b782ed0 Compare August 26, 2026 08:20
@evan-sift
evan-sift force-pushed the rust/mcp-preview-rule branch from c49576a to ac9064e Compare August 26, 2026 08:20
@evan-sift
evan-sift marked this pull request as ready for review August 26, 2026 08:21
@evan-sift
evan-sift requested a review from lineville August 26, 2026 08:21
Add a preview_rule tool over the rule evaluation service's dry-run RPC.
Supports evaluating a saved rule (by id or name, resolved through the
existing rules service) or an ad-hoc draft rule config against a run,
without persisting anything.
@evan-sift
evan-sift force-pushed the rust/mcp-calculated-channel-data branch from b782ed0 to bc3f432 Compare August 27, 2026 04:40
@evan-sift
evan-sift force-pushed the rust/mcp-preview-rule branch from ac9064e to bda5135 Compare August 27, 2026 04:40
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