Skip to content

Fix: Allow --trust-tools to work on MCP servers #2039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swapneils
Copy link

Issue #, if available:

Currently if you call --trust-tools with tools that will be vended by MCP servers, the configuration doesn't take effect.

Reproduction steps:

  1. Run q chat --trust-tools=<tool> (e.g. clear_thought___sequentialthinking)
  2. Wait for the MCP server to start up
  3. Run /tools to check trust status
  4. Validate the (incorrectly untrusted) trust status by asking Q to run the tool for some trivial purpose.

Description of changes:

This PR modifies the ToolPermissions implementation to track tools from the --trust-tools config that don't exist yet, and triggers adding them to permissions when they're available. It also configures untrust_tool to modify this pending config as well as permissions, to avoid edge-cases where a tool can't be untrusted due to being in the pending list.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: Any opinions or communications in this pull request are entirely my own, and do not reflect those of AWS or its other employees.

@swapneils swapneils requested a review from a team as a code owner June 10, 2025 22:05
@swapneils
Copy link
Author

Seeing build failures, but the error messages seem to be mostly on dependency packages I didn't touch?
Not sure what action to take on those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant