Skip to content

chore(trpc,mcp,cli,sdk,desktop): remove dead mcpScope plumbing - #6486

Merged
saddlepaddle merged 1 commit into
mainfrom
chore/remove-dead-mcp-scope
Aug 14, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
chore/remove-dead-mcp-scope

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Aug 14, 2026 •

Copy link
Copy Markdown
Collaborator

What

Removes mcpScope from every surface that carries it:

  • tRPC createAutomationSchema / updateAutomationSchema and the router
  • MCP automations.create / automations.update tool inputs
  • CLI automations create and the --mcp-scope flag on automations update
  • SDK Automation, AutomationCreateParams, AutomationUpdateParams
  • Desktop CreateAutomationDialog

The automations.mcp_scope column stays.

Why

It has never had a consumer. dispatch.ts builds the agents.run payload from agent and prompt and never passes it, and MCP was hardcoded disableMcp: true when automations shipped.

Every caller writes [] unconditionally:

  • CreateAutomationDialog.tsx hardcodes mcpScope: []
  • cli/automations/create hardcodes mcpScope: []
  • the tRPC schema defaults it to []

So it is a field users can set through three public surfaces that has no effect anywhere.

Why the column stays

Dropping it now would break currently deployed code, since Drizzle selects columns explicitly and running instances still name mcp_scope in their SELECT. It drops alongside rrule, dtstart, timezone, and next_run_at once the automation trigger cutover is complete and nothing reads the legacy columns.

Note on public surfaces

This removes a field from the CLI and SDK. It is technically a breaking change for anyone passing mcpScope, but passing it has never done anything, so nothing can regress behaviourally.

Testing

  • bun run typecheck — 37/37 packages
  • bun run lint — clean
  • bun test packages/trpc packages/cli apps/api — 131 pass
  • grep confirms the only remaining reference is the column definition

Summary by cubic

Removes the unused mcpScope field from automation create/update across tRPC, MCP tools, CLI, SDK types, and the desktop dialog. The field never affected execution; the database column remains to avoid breaking running instances.

  • Migration/rollout:
    • Remove --mcp-scope from any automations update CLI usage.
    • Stop sending mcpScope in SDK payloads and tRPC/MCP inputs; delete references to Automation.mcpScope, AutomationCreateParams.mcpScope, and AutomationUpdateParams.mcpScope.
    • The automations.mcp_scope column stays for now and will be dropped with other legacy trigger columns after the cutover.

Written for commit bab40b5. Summary will update on new commits.

Review in cubic

`automations.mcp_scope` has been plumbed end to end since it was added: tRPC
create/update schemas, the router, the MCP tools, a CLI flag, SDK types, and the
desktop create dialog.

Nothing reads it. `dispatch.ts` never passes it to `agents.run`, and every
caller writes `[]` unconditionally — the desktop dialog hardcodes it, the CLI
defaults it. MCP was hardcoded `disableMcp: true` when automations shipped, so
the field never had a consumer.

Removes the plumbing. The column stays for now and drops with the other dead
automation columns once the trigger cutover completes; deployed code still
selects it.
@coderabbitai

coderabbitai Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2ac3edd4-6a27-460b-a5f3-7b97cd7b8e18

📥 Commits

Reviewing files that changed from the base of the PR and between c88228a and bab40b5.

📒 Files selected for processing (8)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/components/CreateAutomationDialog/CreateAutomationDialog.tsx
  • packages/cli/src/commands/automations/create/command.ts
  • packages/cli/src/commands/automations/update/command.ts
  • packages/mcp/src/tools/automations/create.ts
  • packages/mcp/src/tools/automations/update.ts
  • packages/sdk/src/resources/automations.ts
  • packages/trpc/src/router/automation/automation.ts
  • packages/trpc/src/router/automation/schema.ts
💤 Files with no reviewable changes (8)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/components/CreateAutomationDialog/CreateAutomationDialog.tsx
  • packages/cli/src/commands/automations/create/command.ts
  • packages/mcp/src/tools/automations/update.ts
  • packages/mcp/src/tools/automations/create.ts
  • packages/trpc/src/router/automation/automation.ts
  • packages/trpc/src/router/automation/schema.ts
  • packages/sdk/src/resources/automations.ts
  • packages/cli/src/commands/automations/update/command.ts

📝 Walkthrough

Walkthrough

The automation API removes mcpScope from SDK types, validation schemas, MCP tools, CLI and desktop payloads, and tRPC persistence logic.

Changes

Automation MCP scope removal

Layer / File(s) Summary
Update automation contracts
packages/trpc/src/router/automation/schema.ts, packages/sdk/src/resources/automations.ts, packages/mcp/src/tools/automations/*
Automation schemas, SDK types, and MCP tool inputs no longer define mcpScope.
Remove client payload fields
apps/desktop/.../CreateAutomationDialog.tsx, packages/cli/src/commands/automations/{create,update}/command.ts
Desktop and CLI automation requests no longer send or parse mcpScope.
Stop persisting MCP scope
packages/trpc/src/router/automation/automation.ts
Automation creation and update mutations no longer write mcpScope.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to bab40

This removes an unused automation field from public interfaces while preserving the existing database column, with no actionable merge-blocking risk remaining after normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title uses conventional commit format and clearly summarizes the removal of unused mcpScope plumbing across the listed packages.
Description check ✅ Passed The description explains what changed, why the column remains, compatibility impact, and testing results; the checklist section is omitted.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/remove-dead-mcp-scope

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@saddlepaddle
saddlepaddle merged commit c6832bf into main Aug 14, 2026
19 checks passed
@saddlepaddle
saddlepaddle deleted the chore/remove-dead-mcp-scope branch August 14, 2026 22:17
@harshithmullapudi harshithmullapudi mentioned this pull request Oct 5, 2026
2 tasks done

This branch was previously deployed

1 inactive deployment
preview — bab40b5c Deployed Aug 14, 2026 by saddlepaddle via Deploy Web #7730
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.

1 participant