@@ -26,6 +26,7 @@ export interface AddGatewayOptions {
2626 agentClientId ?: string ;
2727 agentClientSecret ?: string ;
2828 agents ?: string ;
29+ noSemanticSearch ?: boolean ;
2930}
3031
3132/**
@@ -156,6 +157,7 @@ export class GatewayPrimitive extends BasePrimitive<AddGatewayOptions, Removable
156157 . option ( '--agent-client-id <id>' , 'Agent OAuth client ID' )
157158 . option ( '--agent-client-secret <secret>' , 'Agent OAuth client secret' )
158159 . option ( '--agents <agents>' , 'Comma-separated agent names' )
160+ . option ( '--no-semantic-search' , 'Disable semantic search for tool discovery' )
159161 . option ( '--json' , 'Output as JSON' )
160162 . action ( async ( rawOptions : Record < string , string | boolean | undefined > ) => {
161163 const cliOptions = rawOptions as unknown as CLIAddGatewayOptions ;
@@ -186,6 +188,7 @@ export class GatewayPrimitive extends BasePrimitive<AddGatewayOptions, Removable
186188 agentClientId : cliOptions . agentClientId ,
187189 agentClientSecret : cliOptions . agentClientSecret ,
188190 agents : cliOptions . agents ,
191+ noSemanticSearch : cliOptions . semanticSearch === false ,
189192 } ) ;
190193
191194 if ( cliOptions . json ) {
@@ -282,6 +285,7 @@ export class GatewayPrimitive extends BasePrimitive<AddGatewayOptions, Removable
282285 description : options . description ?? `Gateway for ${ options . name } ` ,
283286 authorizerType : options . authorizerType ,
284287 jwtConfig : undefined ,
288+ enableSemanticSearch : ! options . noSemanticSearch ,
285289 } ;
286290
287291 if ( options . authorizerType === 'CUSTOM_JWT' && options . discoveryUrl ) {
@@ -348,6 +352,7 @@ export class GatewayPrimitive extends BasePrimitive<AddGatewayOptions, Removable
348352 targets : movedTargets ,
349353 authorizerType : config . authorizerType ,
350354 authorizerConfiguration : this . buildAuthorizerConfiguration ( config ) ,
355+ enableSemanticSearch : config . enableSemanticSearch ,
351356 } ;
352357
353358 mcpSpec . agentCoreGateways . push ( gateway ) ;
0 commit comments