The Tool Interface System - How Claude Interacts with the World
export type Tool = {
name: string // Unique tool identifier
description: string // What the tool does
inputSchema: ToolInputJSONSchema // JSON Schema for input
definition?: { // API-facing definition
name: string
description: string
input_schema: ToolInputJSONSchema
}
execute( // Tool execution function
input: Record<string, unknown>,
context: ToolUseContext
): Promise<ToolResult>
isAutomated?: boolean // Auto-approve in auto mode
}
Every tool in Claude Code - from FileReadTool to BashTool to AgentTool - implements this same interface. The execute() function receives typed input and returns a structured ToolResult.
User is prompted for each tool execution. Every action requires explicit approval. Recommended for beginners and sensitive environments.
AI automatically approves safe operations via a classifier. Dangerous operations still require user approval. Best for experienced developers.
No prompting - all tools are auto-approved. Requires explicit setup. Use with extreme caution in trusted environments only.
Go to the Playground Permission Simulator. Compare what happens when you use Default vs Auto mode for BashTool:rm.