Skip to content

isError Pass Through with the MCP Tool Call#446

Draft
swapnil-nagar wants to merge 1 commit into
v4.xfrom
swapnil/McpToolIsErrorIssue
Draft

isError Pass Through with the MCP Tool Call#446
swapnil-nagar wants to merge 1 commit into
v4.xfrom
swapnil/McpToolIsErrorIssue

Conversation

@swapnil-nagar

Copy link
Copy Markdown
Contributor

// the MCP SDK's full `CallToolResult` (including `isError`, `structuredContent`, `_meta`).
// The non-passthrough envelope only carries `content` + `structuredContent`, so any
// `isError` value would otherwise be silently dropped.
if (response.isError !== undefined) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly there is not reason not to do this for all of the responses; instead of an if-statement here, why not just use CallToolResult for everything?

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