MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / untrust_tools

Method untrust_tools

crates/chat-cli/src/cli/agent/mod.rs:464–468  ·  view source on GitHub ↗

This function assumes the relevant transformation to the tool names have been done: - model tool name -> host tool name - custom tool namespacing

(&mut self, tool_names: &[String])

Source from the content-addressed store, hash-verified

462 /// - model tool name -> host tool name
463 /// - custom tool namespacing
464 pub fn untrust_tools(&mut self, tool_names: &[String]) {
465 if let Some(agent) = self.get_active_mut() {
466 agent.allowed_tools.retain(|t| !tool_names.contains(t));
467 }
468 }
469
470 pub fn get_active(&self) -> Option<&Agent> {
471 self.agents.get(&self.active_idx)

Callers 1

executeMethod · 0.80

Calls 1

get_active_mutMethod · 0.80

Tested by

no test coverage detected