File tree Expand file tree Collapse file tree 5 files changed +16
-3
lines changed Expand file tree Collapse file tree 5 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,7 @@ async function generateToolResponse(
412412
413413 const toolResults = await Promise . all (
414414 toolUseBlocks . map ( async ( toolUse ) => {
415- const tool = params . tools . find ( ( t ) => t . name === toolUse . name ) ;
415+ const tool = params . tools . find ( ( t ) => ( 'name' in t ? t . name : t . mcp_server_name ) === toolUse . name ) ;
416416 if ( ! tool || ! ( 'run' in tool ) ) {
417417 return {
418418 type : 'tool_result' as const ,
Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ async function generateToolResponse(
319319
320320 const toolResults = await Promise . all (
321321 toolUseBlocks . map ( async ( toolUse ) => {
322- const tool = params . tools . find ( ( t ) => t . name === toolUse . name ) ;
322+ const tool = params . tools . find ( ( t ) => ( 'name' in t ? t . name : t . mcp_server_name ) === toolUse . name ) ;
323323 if ( ! tool || ! ( 'run' in tool ) ) {
324324 return {
325325 type : 'tool_result' as const ,
Original file line number Diff line number Diff line change @@ -194,6 +194,8 @@ import {
194194 MessageCreateParamsNonStreaming ,
195195 MessageCreateParamsStreaming ,
196196 Messages ,
197+ BetaMCPToolConfig ,
198+ BetaMCPToolDefaultConfig ,
197199} from './messages/messages' ;
198200import * as SkillsAPI from './skills/skills' ;
199201import {
Original file line number Diff line number Diff line change @@ -91,7 +91,6 @@ export {
9191 type BetaJSONOutputFormat ,
9292 type BetaInputTokensClearAtLeast ,
9393 type BetaInputTokensTrigger ,
94- type BetaJSONOutputFormat ,
9594 type BetaMCPToolConfig ,
9695 type BetaMCPToolDefaultConfig ,
9796 type BetaMCPToolResultBlock ,
@@ -215,6 +214,7 @@ export {
215214 type MessageCreateParamsNonStreaming ,
216215 type MessageCreateParamsStreaming ,
217216 type MessageCountTokensParams ,
217+ type BetaToolResultContentBlockParam ,
218218} from './messages/index' ;
219219export {
220220 Models ,
Original file line number Diff line number Diff line change @@ -198,5 +198,16 @@ export {
198198 type MessageCreateParamsStreaming ,
199199 type MessageCountTokensParams ,
200200 type BetaMessageStreamParams ,
201+ type BetaToolSearchToolBm25_20251119 ,
202+ type BetaToolSearchToolRegex20251119 ,
203+ type BetaToolSearchToolResultBlock ,
204+ type BetaToolSearchToolResultBlockParam ,
205+ type BetaToolSearchToolResultError ,
206+ type BetaToolSearchToolResultErrorParam ,
207+ type BetaToolSearchToolSearchResultBlock ,
208+ type BetaToolSearchToolSearchResultBlockParam ,
209+ type BetaMCPToolConfig ,
210+ type BetaMCPToolDefaultConfig ,
211+ type BetaToolResultContentBlockParam ,
201212} from './messages' ;
202213export { BetaToolRunner , type BetaToolRunnerParams } from './messages' ;
You can’t perform that action at this time.
0 commit comments