Repository navigation
fix(bma): pass the Gateway to BMA as connector_id - #2580
Open
siwachabhi wants to merge 1 commit into
Open
siwachabhi wants to merge 1 commit into
siwachabhi wants to merge 1 commit into
Conversation
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Small, self-contained update to the vended BMA sample client:
client.pyswitches the Gateway tool from the oldtransport.server_url+connection_origin: serviceshape to the newerconnector_id: <gateway ARN>form, and updates--gateway's help text accordingly.README.mdis updated to tell users to pass the Gateway ARN and documents the2025-03-26MCP protocol-version caveat (silent empty tool list if the Gateway doesn't advertise it).- The
assets.snapshot.test.ts.snapsnapshot is updated to match both files.
I verified agentcore deploy does emit the gateway ARN in its output (actions.ts constructs the line from gateway.gatewayArn), so the README's "ARN from the output of agentcore deploy" is accurate. (Side note, not for this PR: that line is still labeled Gateway URLs: in src/cli/commands/deploy/actions.ts:853 even though it prints ARNs — worth a follow-up but out of scope here.)
No telemetry considerations — this is content inside a vended Python sample. LGTM.
Contributor
Coverage Report
|
BMA rejects the Gateway tool that client.py sends with --gateway:
400 "Invalid 'agent.tools[0]': value is not valid under any of the
schemas listed in the 'oneOf' keyword." The AWS mcp tool takes the
Gateway ARN in connector_id. It has no transport field, and BMA
removed the required field.
- client.py sends {type, server_label, connector_id} and --gateway
takes the Gateway ARN.
- The extra input asks the agent to list the Gateway tools, so it
works with any Gateway.
- README.md tells the user to give the ARN, and that a Gateway that
lists its MCP versions must include 2025-03-26.
siwachabhi
force-pushed
the
fix/bma-gateway-connector-id
branch
from
October 13, 2026 20:15
b92fd6b to
c2d17d6
Compare
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
client.pyin the Bedrock Managed Agents (BMA) template sends a Gateway tool that BMA rejects. With--gateway, the session fails:The AWS
mcptool identifies the Gateway by its ARN inconnector_id. It has notransportfield, and BMA removed therequiredfield. BMA calls the Gateway from the service side with the session role, which already hasbedrock-agentcore:InvokeGatewayongateway/*.Changes:
client.pysends{"type": "mcp", "server_label": "team_tools", "connector_id": <Gateway ARN>}.--gatewaytakes the Gateway ARN.README.mdtells the user to give the ARN, to use the flag only for a new session, and that the Gateway must support MCP version2025-03-26. Without it, the agent gets no Gateway tools and BMA shows no error.Related Issue
No issue. A user reported the 400 error during the BMA preview.
Documentation PR
The AgentCore developer guide page
runtime-get-started-bmagets a matching change in a separate internal docs review.Type of Change
Testing
npm run test:unit(441 files, 6352 tests pass). I did not runnpm run test:integ.npm run typechecknpm run lint(0 errors, 35 warnings that existed before)npm run test:update-snapshotsand committed the updated snapshotsEnd-to-end test in us-east-1 with CLI v0.31.1: a BMA project, a Gateway from
agentcore add gateway --protocol-type MCP --authorizer-type AWS_IAM, and a Lambda target that returns a value the model cannot guess.required,connection_origin,transport)oneOferrorconnector_idonly,environment: noneconnector_id, Runtime environmentconnector_id+required: trueoneOferrorconnector_id+connection_origin: "service"supportedVersions: ["2025-11-25"]only["2025-11-25", "2025-03-26"]client.py --runtime <ARN> --gateway <Gateway ARN>Checklist
client.py)