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

Function getAllBaseTools

src/tools.ts:193–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191 * NOTE: This MUST stay in sync with https://console.statsig.com/4aF3Ewatb6xPVpCwxb5nA3/dynamic_configs/claude_code_global_system_caching, in order to cache the system prompt across users.
192 */
193export function getAllBaseTools(): Tools {
194 return [
195 AgentTool,
196 TaskOutputTool,
197 BashTool,
198 // Ant-native builds have bfs/ugrep embedded in the bun binary (same ARGV0
199 // trick as ripgrep). When available, find/grep in Claude's shell are aliased
200 // to these fast tools, so the dedicated Glob/Grep tools are unnecessary.
201 ...(hasEmbeddedSearchTools() ? [] : [GlobTool, GrepTool]),
202 ExitPlanModeV2Tool,
203 FileReadTool,
204 FileEditTool,
205 FileWriteTool,
206 NotebookEditTool,
207 WebFetchTool,
208 TodoWriteTool,
209 WebSearchTool,
210 TaskStopTool,
211 AskUserQuestionTool,
212 SkillTool,
213 EnterPlanModeTool,
214 ...(process.env.USER_TYPE === 'ant' ? [ConfigTool] : []),
215 ...(process.env.USER_TYPE === 'ant' ? [TungstenTool] : []),
216 ...(SuggestBackgroundPRTool ? [SuggestBackgroundPRTool] : []),
217 ...(WebBrowserTool ? [WebBrowserTool] : []),
218 ...(isTodoV2Enabled()
219 ? [TaskCreateTool, TaskGetTool, TaskUpdateTool, TaskListTool]
220 : []),
221 ...(OverflowTestTool ? [OverflowTestTool] : []),
222 ...(CtxInspectTool ? [CtxInspectTool] : []),
223 ...(TerminalCaptureTool ? [TerminalCaptureTool] : []),
224 ...(isEnvTruthy(process.env.ENABLE_LSP_TOOL) ? [LSPTool] : []),
225 ...(isWorktreeModeEnabled() ? [EnterWorktreeTool, ExitWorktreeTool] : []),
226 getSendMessageTool(),
227 ...(ListPeersTool ? [ListPeersTool] : []),
228 ...(isAgentSwarmsEnabled()
229 ? [getTeamCreateTool(), getTeamDeleteTool()]
230 : []),
231 ...(VerifyPlanExecutionTool ? [VerifyPlanExecutionTool] : []),
232 ...(process.env.USER_TYPE === 'ant' && REPLTool ? [REPLTool] : []),
233 ...(WorkflowTool ? [WorkflowTool] : []),
234 ...(SleepTool ? [SleepTool] : []),
235 ...cronTools,
236 ...(RemoteTriggerTool ? [RemoteTriggerTool] : []),
237 ...(MonitorTool ? [MonitorTool] : []),
238 BriefTool,
239 ...(SendUserFileTool ? [SendUserFileTool] : []),
240 ...(PushNotificationTool ? [PushNotificationTool] : []),
241 ...(SubscribePRTool ? [SubscribePRTool] : []),
242 ...(getPowerShellTool() ? [getPowerShellTool()] : []),
243 ...(SnipTool ? [SnipTool] : []),
244 ...(process.env.NODE_ENV === 'test' ? [TestingPermissionTool] : []),
245 ListMcpResourcesTool,
246 ReadMcpResourceTool,
247 // Include ToolSearchTool when tool search might be enabled (optimistic check)
248 // The actual decision to defer tools happens at request time in claude.ts
249 ...(isToolSearchEnabledOptimistic() ? [ToolSearchTool] : []),
250 ]

Callers 5

getToolsForDefaultPresetFunction · 0.85
getToolsFunction · 0.85
SessionPreviewFunction · 0.85
runToolUseFunction · 0.85
useInboxPollerFunction · 0.85

Calls 10

hasEmbeddedSearchToolsFunction · 0.85
isTodoV2EnabledFunction · 0.85
isEnvTruthyFunction · 0.85
isWorktreeModeEnabledFunction · 0.85
getSendMessageToolFunction · 0.85
isAgentSwarmsEnabledFunction · 0.85
getTeamCreateToolFunction · 0.85
getTeamDeleteToolFunction · 0.85
getPowerShellToolFunction · 0.85

Tested by

no test coverage detected