MCPcopy
hub / github.com/claude-code-best/claude-code / getReadOnlyToolNames

Function getReadOnlyToolNames

src/utils/messages.ts:3687–3702  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3685}
3686
3687function getReadOnlyToolNames(): string {
3688 // Ant-native builds alias find/grep to embedded bfs/ugrep and remove the
3689 // dedicated Glob/Grep tools from the registry, so point at find/grep via
3690 // Bash instead.
3691 const tools = hasEmbeddedSearchTools()
3692 ? [FILE_READ_TOOL_NAME, '`find`', '`grep`']
3693 : [FILE_READ_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME]
3694 const { allowedTools } = getCurrentProjectConfig()
3695 // allowedTools is a tool-name allowlist. find/grep are shell commands, not
3696 // tool names, so the filter is only meaningful for the non-embedded branch.
3697 const filtered =
3698 allowedTools && allowedTools.length > 0 && !hasEmbeddedSearchTools()
3699 ? tools.filter(t => allowedTools.includes(t))
3700 : tools
3701 return filtered.join(', ')
3702}
3703
3704/**
3705 * Iterative interview-based plan mode workflow.

Callers 1

Calls 2

hasEmbeddedSearchToolsFunction · 0.85
getCurrentProjectConfigFunction · 0.85

Tested by

no test coverage detected