MCPcopy Create free account
hub / github.com/IBM/mcp-cli / get_tool_confirmation

Method get_tool_confirmation

src/mcp_cli/utils/preferences.py:284–293  ·  view source on GitHub ↗

Get confirmation setting for a specific tool. Args: tool_name: Name of the tool Returns: 'always', 'never', 'ask', or None (use global default)

(self, tool_name: str)

Source from the content-addressed store, hash-verified

282 self.save_preferences()
283
284 def get_tool_confirmation(self, tool_name: str) -> str | None:
285 """Get confirmation setting for a specific tool.
286
287 Args:
288 tool_name: Name of the tool
289
290 Returns:
291 'always', 'never', 'ask', or None (use global default)
292 """
293 return self.preferences.ui.tool_confirmation.per_tool.get(tool_name)
294
295 def set_tool_confirmation(self, tool_name: str, setting: str | None) -> None:
296 """Set confirmation for a specific tool.

Callers 3

should_confirm_toolMethod · 0.95

Calls 1

getMethod · 0.45

Tested by 2