MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getAllBaseTools

Function getAllBaseTools

source code/tools.ts:195–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

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