Description
Dynamic tool listing on a Gateway Target is partially exposed in CFN today via AWS::BedrockAgentCore::GatewayTarget.TargetConfiguration.Mcp.McpServer.ListingMode — allowed values DEFAULT | DYNAMIC. With DYNAMIC, the gateway calls tools/list on the upstream MCP server at request time instead of caching a static list. Source: McpServerTargetConfiguration CFN docs.
The CLI's schema marks toolDefinitions as optional for mcpServer targets (src/schema/schemas/mcp.ts:346–347) — this implicitly maps to DYNAMIC listing, but:
- There is no explicit
--listing-mode flag and no schema field in AgentCoreGatewayTargetSchema that maps to ListingMode.
- The L3 construct does not pass
ListingMode to CfnGatewayTarget; it relies entirely on the presence/absence of toolDefinitions.
- There is no CFN support for Lambda-backed dynamic listing today —
McpLambdaTargetConfiguration only takes LambdaArn + ToolSchema (InlinePayload or S3 — both static). This is a service-side gap.
Acceptance Criteria
Additional Context
- CFN support: PARTIAL —
McpServer.ListingMode only; Lambda dynamic listing is not modeled.
- L3 gap: yes —
@aws/agentcore-cdk Gateway target construct needs to pass ListingMode explicitly.
- Lambda dynamic listing requires a service-side change (no
ListingMode on McpLambdaTargetConfiguration); track separately with the service team.
- Reference: McpServerTargetConfiguration says "MCP resources for dynamic targets will be dynamically retrieved when listing tools".
Description
Dynamic tool listing on a Gateway Target is partially exposed in CFN today via
AWS::BedrockAgentCore::GatewayTarget.TargetConfiguration.Mcp.McpServer.ListingMode— allowed valuesDEFAULT | DYNAMIC. WithDYNAMIC, the gateway callstools/liston the upstream MCP server at request time instead of caching a static list. Source: McpServerTargetConfiguration CFN docs.The CLI's schema marks
toolDefinitionsas optional formcpServertargets (src/schema/schemas/mcp.ts:346–347) — this implicitly maps toDYNAMIClisting, but:--listing-modeflag and no schema field inAgentCoreGatewayTargetSchemathat maps toListingMode.ListingModetoCfnGatewayTarget; it relies entirely on the presence/absence oftoolDefinitions.McpLambdaTargetConfigurationonly takesLambdaArn+ToolSchema(InlinePayloadorS3— both static). This is a service-side gap.Acceptance Criteria
listingMode?: 'DEFAULT' | 'DYNAMIC'to themcpServerdiscriminator inAgentCoreGatewayTargetSchema.--listing-modeflag toagentcore add gateway-target --type mcpServer.CfnGatewayTarget.TargetConfiguration.Mcp.McpServer.ListingMode.Additional Context
McpServer.ListingModeonly; Lambda dynamic listing is not modeled.@aws/agentcore-cdkGateway target construct needs to passListingModeexplicitly.ListingModeonMcpLambdaTargetConfiguration); track separately with the service team.