fix(mcp): child workflow with response block returns error#3114
Merged
icecrasher321 merged 1 commit intostagingfrom Feb 2, 2026
Merged
fix(mcp): child workflow with response block returns error#3114icecrasher321 merged 1 commit intostagingfrom
icecrasher321 merged 1 commit intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
Greptile OverviewGreptile SummaryFixed a boolean coercion bug in MCP tool execution that incorrectly flagged successful workflows with response blocks as errors. When
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant MCP as MCP Server Route
participant DB as Database
participant WF as Workflow Execute API
participant Executor as Workflow Executor
Client->>MCP: POST tools/call (workflow execution)
MCP->>DB: Fetch tool and workflow info
DB-->>MCP: Tool & workflow details
MCP->>WF: POST /api/workflows/{id}/execute
WF->>Executor: Execute workflow with input
Executor->>Executor: Process blocks & response block
alt Workflow with Response Block
Executor-->>WF: Result (success: undefined)
WF-->>MCP: executeResult {output, success: undefined}
Note over MCP: Bug: !undefined = true → isError: true ❌
Note over MCP: Fix: undefined === false → isError: false ✅
else Workflow Execution Failed
Executor-->>WF: Result (success: false)
WF-->>MCP: executeResult {success: false, error}
Note over MCP: false === false → isError: true ✅
else Normal Success
Executor-->>WF: Result (success: true)
WF-->>MCP: executeResult {success: true, output}
Note over MCP: true === false → isError: false ✅
end
MCP-->>Client: CallToolResult {content, isError}
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Undefined in response block payload is being interpreted as false returning an error flag even when executed correctly.
Type of Change
Testing
Tested manually
Checklist