fix(mcp): missing isDeployed in contract breaking settings, parameter overrides lack of clarity#5164
Conversation
… overrides lack of clarity
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Tool descriptions can be left empty to mean “use workflow description”; Settings / deploy UX: workflow list queries now include Additive DB migration ( Reviewed by Cursor Bugbot for commit 1732587. Configure here. |
Greptile SummaryThis PR fixes two independent bugs in the Deploy → MCP flow: the "Add Workflows" button was always greyed out because
Confidence Score: 5/5Safe to merge — all data paths are correct, the migration is additive with a safe default, and existing deployed MCP tools are unaffected. The isDeployed fix, the sparse-override model, the migration, and the serve-layer changes are all well-implemented and backward-compatible. The two findings in mcp.tsx are change-detection edge cases that produce a redundant API call or a missed dirty state within a single browser session, with no data corruption. Correctness at the DB and serve layer is solid. apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp/mcp.tsx — the savedValues/dirty-detection logic has two minor edge cases worth a follow-up. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant UI as Deploy Modal (mcp.tsx)
participant API as POST /tools
participant Orch as workflow-mcp-lifecycle
participant Sync as workflow-mcp-sync
participant DB as Database
participant Serve as GET /serve/[serverId]
UI->>UI: load startBlockDescriptions from inputFormat
UI->>UI: show param descriptions (Start-block defaults)
UI->>UI: user edits → computeDescriptionOverrides() → sparse overrides
UI->>API: "{ toolName, toolDescription, parameterDescriptionOverrides }"
API->>Orch: performCreateWorkflowMcpTool()
Orch->>DB: generateParameterSchemaForWorkflow() — base schema
Orch->>Orch: pruneOverridesToSchema() + applyDescriptionOverrides()
Orch->>DB: INSERT tool (parameterSchema, parameterDescriptionOverrides)
Note over Sync,DB: On redeploy (syncMcpToolsForWorkflow)
Sync->>DB: fetch tools with parameterDescriptionOverrides
Sync->>Sync: pruneOverridesToSchema() — drops stale fields
Sync->>Sync: applyDescriptionOverrides(newBaseSchema, prunedOverrides)
Sync->>DB: UPDATE parameterSchema + parameterDescriptionOverrides
Note over Serve,DB: At serve time (tools/list)
Serve->>DB: SELECT tool JOIN workflow
Serve->>Serve: "toolDescription?.trim() || getMeaningfulWorkflowDescription() || fallback"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant UI as Deploy Modal (mcp.tsx)
participant API as POST /tools
participant Orch as workflow-mcp-lifecycle
participant Sync as workflow-mcp-sync
participant DB as Database
participant Serve as GET /serve/[serverId]
UI->>UI: load startBlockDescriptions from inputFormat
UI->>UI: show param descriptions (Start-block defaults)
UI->>UI: user edits → computeDescriptionOverrides() → sparse overrides
UI->>API: "{ toolName, toolDescription, parameterDescriptionOverrides }"
API->>Orch: performCreateWorkflowMcpTool()
Orch->>DB: generateParameterSchemaForWorkflow() — base schema
Orch->>Orch: pruneOverridesToSchema() + applyDescriptionOverrides()
Orch->>DB: INSERT tool (parameterSchema, parameterDescriptionOverrides)
Note over Sync,DB: On redeploy (syncMcpToolsForWorkflow)
Sync->>DB: fetch tools with parameterDescriptionOverrides
Sync->>Sync: pruneOverridesToSchema() — drops stale fields
Sync->>Sync: applyDescriptionOverrides(newBaseSchema, prunedOverrides)
Sync->>DB: UPDATE parameterSchema + parameterDescriptionOverrides
Note over Serve,DB: At serve time (tools/list)
Serve->>DB: SELECT tool JOIN workflow
Serve->>Serve: "toolDescription?.trim() || getMeaningfulWorkflowDescription() || fallback"
Reviews (3): Last reviewed commit: "address ux concern" | Re-trigger Greptile |
|
@greptile |
|
bugbot run |
|
bugbot run |
|
@greptile |
|
bugbot run |
|
bugbot run |
|
bugbot run |
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 1732587. Configure here.
Summary
Fix the Deploy → MCP flow so Start‑block input descriptions are no longer dropped: the Start block is now the default source for MCP tool parameter descriptions, with durable per‑tool overrides stored in a new workflow_mcp_tool.parameter_description_overrides column (parameterSchema becomes a materialized base‑plus‑overrides cache that the redeploy sync re‑applies, so overrides survive redeploys), and the tool description now falls back to the workflow description when unset.
Also enables the previously‑always‑greyed "Add Workflows" button (the deployed‑workflows query now receives isDeployed), makes that header chip a primary + Add Workflows, and deep‑links "Manage" to the specific server's config. Additive/expand‑only migration with no serve‑side changes for existing tools, so already‑deployed MCP servers keep working unchanged.
Type of Change
Testing
Tested manually
Checklist