Repository navigation
Conversation
suggest_aws_commands posts the user's query to a remote endpoint (ENDPOINT_SUGGEST_AWS_COMMANDS, default https://api-mcp.global.api.aws/suggest-aws-commands), so it interacts with an external service. Declare openWorldHint=True, as call_aws does.
vinmay
requested review from
a team,
PCManticore,
arnewouters,
bidesh,
iddv and
rshevchuk-git
as code owners
October 6, 2026 02:56
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.
Fixes: N/A
Summary
Changes
suggest_aws_commandsdeclaresopenWorldHint=False, whilecall_awsin the same file, which also talks to AWS services, declaresopenWorldHint=True. Everysuggest_aws_commandscall sends the user's query to a remote endpoint:suggest_aws_commands→get_requests_session()→session.post(ENDPOINT_SUGGEST_AWS_COMMANDS, json={'query': query}, timeout=30)(server.py)ENDPOINT_SUGGEST_AWS_COMMANDS = os.getenv('ENDPOINT_SUGGEST_AWS_COMMANDS', 'https://api-mcp.global.api.aws/suggest-aws-commands')(core/common/config.py)Per the MCP spec,
openWorldHintsays whether a tool may interact with an "open world" of external entities (the spec's example of open is web search; of closed, a memory tool). Sending user-provided text to a remote service makes this tool open-world, even though the endpoint is fixed: a fixed endpoint narrows where the query goes, not whether it leaves the machine.This PR changes only that hint (plus a CHANGELOG entry).
readOnlyHint=Truestays: the tool doesn't modify the environment.Tested:
uv run --frozen pyright(0 errors), the aws-api-mcp-server unit tests (uv run --frozen pytest tests: 739 passed), andpre-commit runon the changed files (all hooks pass).Why this matters
A user who asks for command suggestions has their query sent to a remote service. Queries can include account details, resource names, or what the user is trying to do (the tool's own examples include "List all IAM users who have AdministratorAccess policy"). The user had no reason to expect that from a closed-world tool. The endpoint being AWS's own service doesn't change this: the hint describes whether the tool reaches outside the user's environment, not whether the destination is trustworthy.
User experience
Before: clients that use
openWorldHintto decide what to auto-approve, and policies that restrict tools sending data off-machine, may treatsuggest_aws_commandsas closed-world and let it send the user's query to a remote service without asking.After: the tool is declared open-world, so those clients and policies apply their open-world handling (e.g. prompting before the first call).
How this was found
Spotted while testing ReachScan's annotation checks, then traced by hand.
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? (Y/N) N
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.