feat(gateway-target): support resource priority on targets / tools
- Dominant language
- TypeScript
- Stars
- 283
- Forks
- 95
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 183
Description
### Description
The user is asking for **Resource Priority** on Gateway Targets / tools — a way to express ordering / precedence so that when multiple targets expose tools with overlapping names or when the gateway needs to choose among targets, the priority breaks ties.
Today neither CFN nor the CLI exposes this. `ApiGatewayToolFilter` only has `FilterPath` and `Methods` ([CFN docs](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrockagentcore-gatewaytarget-apigatewaytoolfilter.md)) — no `Priority`. The L3 schema (`src/schema/schemas/mcp.ts`) has nothing analogous.
### Acceptance Criteria
- [ ] Confirm with the AgentCore service team whether the data-plane API supports a priority field on a target / tool today (control-plane API may have it before CFN).
- [ ] If the data plane supports it: extend `AgentCoreGatewayTargetSchema` (and/or `ToolDefinitionSchema`) with an optional `priority?: number` field; apply via a post-deploy imperative call (same pattern as #542 for resource-based policies).
- [ ] If the data plane does not support it: file a service-team request for the capability and link this issue.
- [ ] Add `--priority` flag to `agentcore add gateway-target` and surface it in the TUI.
- [ ] When CFN ships a `Priority` property on `GatewayTarget` or its tool filters, switch to the CDK path and deprecate the imperative one.
### Additional Context
- CFN support: **NO** — no priority field on any GatewayTarget property, tool filter, tool override, or target-level config.
- Data-plane: **unknown** — needs internal confirmation.
- This may collapse to "service-team request" until the API exposes it.
Contributor guide
Assessment
This issue has not been assessed yet.