Skip to content

Commit d0bd36a

Browse files
joaquinhuiclaude
andcommitted
Address PR feedback: add structuredContent assertion and changeset
Add structuredContent assertion to callToolStream test for parity with callTool test, and add changeset file for the patch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e9b82a0 commit d0bd36a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@modelcontextprotocol/sdk": patch
3+
---
4+
5+
Skip structuredContent validation when tool result has isError: true

test/integration/test/client/client.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4161,6 +4161,7 @@ test('callToolStream() should not validate structuredContent when isError is tru
41614161
if (messages[0]!.type === 'result') {
41624162
expect(messages[0]!.result.isError).toBe(true);
41634163
expect(messages[0]!.result.content).toEqual([{ type: 'text', text: 'Something went wrong' }]);
4164+
expect(messages[0]!.result.structuredContent).toEqual({ wrongField: 123 });
41644165
}
41654166

41664167
await client.close();

0 commit comments

Comments
 (0)