File tree Expand file tree Collapse file tree
integration-tests/sdk-typescript Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -477,7 +477,8 @@ describe('MCP Server Integration (E2E)', () => {
477477 describe ( 'MCP Tool Message Flow' , ( ) => {
478478 it ( 'should receive proper message sequence for MCP tool usage' , async ( ) => {
479479 const q = query ( {
480- prompt : 'Use add to calculate 2 + 3' ,
480+ prompt :
481+ 'Use the add tool to calculate 2 + 3. You must call the tool. Just give me the result.' ,
481482 options : {
482483 ...SHARED_TEST_OPTIONS ,
483484 cwd : testDir ,
@@ -500,10 +501,9 @@ describe('MCP Server Integration (E2E)', () => {
500501 messageTypes . push ( message . type ) ;
501502
502503 if ( isSDKAssistantMessage ( message ) ) {
503- const toolUseBlocks = findToolUseBlocks ( message ) ;
504+ const toolUseBlocks = findToolUseBlocks ( message , MCP_ADD_TOOL ) ;
504505 if ( toolUseBlocks . length > 0 ) {
505506 foundToolUse = true ;
506- expect ( toolUseBlocks [ 0 ] . name ) . toBe ( MCP_ADD_TOOL ) ;
507507 expect ( toolUseBlocks [ 0 ] . input ) . toBeDefined ( ) ;
508508 }
509509 }
You can’t perform that action at this time.
0 commit comments