improvement(workflow-mcp): single-source MCP tool params, deploy status, chip styling#5029
improvement(workflow-mcp): single-source MCP tool params, deploy status, chip styling#5029waleedlatif1 wants to merge 4 commits into
Conversation
…us, chip styling - Make the start block input format the single source of truth for MCP tool parameter descriptions; the deploy modal writes them back collaboratively so they persist with the workflow and survive redeploys (fixes descriptions getting wiped on workflow edits) - Derive the tool parameter schema from the deployed workflow instead of the draft, so a saved tool can never advertise params the running workflow lacks - Add a Live / Update deployment status badge to the MCP tab, mirroring A2A - Swap the legacy Textarea for ChipTextarea on the tool Description - Extract the duplicated isDefaultDescription helper into one shared util
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Shared Reviewed by Cursor Bugbot for commit 34312fd. Configure here. |
Greptile SummaryThis PR consolidates three competing sources of truth for MCP tool parameter descriptions into one: the start block's
Confidence Score: 5/5Safe to merge — the changes are well-scoped, the previous silent-wipe bug is properly fixed via the shared pickRawInputFormat helper, and no API contracts are broken. The refactor correctly collapses three competing sources of truth into one write path. The pickRawInputFormat helper ensures both the display memo and the updateFieldDescription writer read the identical source. Removing parameterSchema from save calls is intentional and correct — the server now owns schema derivation from the deployed workflow. No regressions were identified in the shared isDefaultDescription extraction. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant McpDeploy
participant SubBlockStore
participant WorkflowStore
participant CollabLayer as Collaborative Layer
participant Server as API Server
User->>McpDeploy: Edit param description (ChipInput onChange)
McpDeploy->>McpDeploy: updateFieldDescription(fieldName, value)
McpDeploy->>SubBlockStore: getState().getValue(starterBlockId, 'inputFormat')
McpDeploy->>WorkflowStore: getState().blocks[starterBlockId] (fallback)
McpDeploy->>McpDeploy: pickRawInputFormat(storeValue, blockFallback)
McpDeploy->>CollabLayer: collaborativeSetSubblockValue(starterBlockId, 'inputFormat', nextFields)
CollabLayer-->>SubBlockStore: Update inputFormat with new description
User->>McpDeploy: Click Save Tool (name/description only)
McpDeploy->>Server: "updateWorkflowMcpTool({ toolName, toolDescription })"
Note over Server: parameterSchema derived from deployed workflow, not client
User->>McpDeploy: Click Deploy (General tab)
Server-->>McpDeploy: Deployed workflow now matches start block inputFormat
Note over McpDeploy: needsRedeployment false, Badge shows Live
Reviews (4): Last reviewed commit: "fix(workflow-mcp): preserve in-progress ..." | Re-trigger Greptile |
…aram descriptions updateFieldDescription read only from the subblock store, but the display memo falls back to the block's persisted inputFormat when the store entry is empty. For workflows whose fields are hydrated from block defaults, editing a description would have written [] and wiped every input field. Extract a shared resolveInputFormatFields helper used by both the memo and the writer, and guard against ever persisting an empty list.
|
@greptile |
|
@cursor review |
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 fdc2679. Configure here.
|
@greptile |
|
@cursor review |
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 17f6a0a. Configure here.
… descriptions Map over the raw input-format array instead of the normalized one so editing a parameter description no longer drops unnamed/in-progress fields from the start block.
|
@greptile |
|
@cursor review |
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 34312fd. Configure here.
Summary
Live/Update deploymentstatus badge to the MCP tab, mirroring the A2A tab, so drift between the tool and the deployed workflow is visible and actionableTextareaforChipTextareaon the tool Description (it predatedChipTextareaand was never migrated)isDefaultDescriptionhelper (copy-pasted across the MCP, A2A, and API-info surfaces) into one shared utilContext
The MCP tab had three competing sources of truth for parameter descriptions (start block, a private modal overlay, and the saved tool schema) that silently overwrote each other. The result: descriptions wiped on every redeploy, and a "Save Tool" that could push a param set different from what the deployed workflow actually runs. This collapses everything to one rule: the MCP tool always mirrors the deployed workflow.
Type of Change
Testing
Tested manually; typecheck, lint, and `check:api-validation` pass.
Follow-up (not in this PR)
Checklist