aws / aws/agentcore-cli

feat(gateway-target): support resource priority on targets / tools

Open
#1,358 0 comments 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.