MCPcopy Create free account
hub / github.com/Noumena-Network/code / getReadOnlyToolNames

Function getReadOnlyToolNames

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

Source from the content-addressed store, hash-verified

3397}
3398
3399function getReadOnlyToolNames(): string {
3400 // Ant-native builds alias find/grep to embedded bfs/ugrep and remove the
3401 // dedicated Glob/Grep tools from the registry, so point at find/grep via
3402 // Bash instead.
3403 const tools = hasEmbeddedSearchTools()
3404 ? [FILE_READ_TOOL_NAME, '`find`', '`grep`']
3405 : [FILE_READ_TOOL_NAME, GLOB_TOOL_NAME, GREP_TOOL_NAME]
3406 const { allowedTools } = getCurrentProjectConfig()
3407 // allowedTools is a tool-name allowlist. find/grep are shell commands, not
3408 // tool names, so the filter is only meaningful for the non-embedded branch.
3409 const filtered =
3410 allowedTools && allowedTools.length > 0 && !hasEmbeddedSearchTools()
3411 ? tools.filter(t => allowedTools.includes(t))
3412 : tools
3413 return filtered.join(', ')
3414}
3415
3416/**
3417 * Iterative interview-based plan mode workflow.

Callers 1

Calls 2

hasEmbeddedSearchToolsFunction · 0.85
getCurrentProjectConfigFunction · 0.85

Tested by

no test coverage detected