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

Function getReadOnlyToolNames

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

Source from the content-addressed store, hash-verified

3297}
3298
3299function getReadOnlyToolNames(): string {
3300 // Ant-native builds alias find/grep to embedded bfs/ugrep and remove the
3301 // dedicated Glob/Grep tools from the registry, so point at find/grep via
3302 // Bash instead.
3303 const tools = hasEmbeddedSearchTools()
3304 ? [FILE_READ_TOOL_NAME, '`find`', '`grep`']
3305 : [FILE_READ_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME]
3306 const { allowedTools } = getCurrentProjectConfig()
3307 // allowedTools is a tool-name allowlist. find/grep are shell commands, not
3308 // tool names, so the filter is only meaningful for the non-embedded branch.
3309 const filtered =
3310 allowedTools && allowedTools.length > 0 && !hasEmbeddedSearchTools()
3311 ? tools.filter(t => allowedTools.includes(t))
3312 : tools
3313 return filtered.join(', ')
3314}
3315
3316/**
3317 * Iterative interview-based plan mode workflow.

Callers 1

Calls 2

hasEmbeddedSearchToolsFunction · 0.85
getCurrentProjectConfigFunction · 0.85

Tested by

no test coverage detected