Skip to main content

Module tools

Module tools 

Source
Expand description

Tool execution and user interaction. Tool execution framework with built-in tools.

Structs§

Answer
Answer to a question - simplified to just question text and answer values.
AskForPermissionsTool
Tool that requests permission from the user for sensitive actions.
AskUserQuestionsRequest
Request to ask user questions.
AskUserQuestionsResponse
Response containing answers to questions.
AskUserQuestionsTool
Tool that asks the user structured questions.
BashTool
Tool that executes bash commands with permission checks.
DisplayConfig
Configuration for how a tool should be displayed in the UI.
DisplayResult
Formatted display result from a tool.
EditFileTool
Tool that performs find-and-replace operations on files.
GlobTool
Tool that finds files matching glob patterns with permission checks.
GrepTool
Tool that searches file contents using ripgrep with permission checks.
LLMTool
Tool definition for function calling.
LsTool
Tool that lists directory contents.
MultiEditTool
Tool that performs multiple find-and-replace operations atomically.
PendingPermissionInfo
Information about a pending permission request for UI display.
PendingQuestionInfo
Information about a pending interaction for UI display.
PermissionPanelResponse
Response from the UI to a permission request.
PermissionRegistry
Registry for managing permission grants and requests.
ReadFileTool
Tool that reads files from the filesystem.
ToolBatchResult
Batch result containing all results from parallel tool executions.
ToolContext
Context provided to tools during execution.
ToolDefinition
Tool definition for the LLM.
ToolExecutor
Manages tool execution with support for parallel batch execution.
ToolRegistry
Thread-safe registry for managing available tools.
ToolRequest
Request to execute a tool.
ToolResult
Result from a single tool execution.
UserInteractionRegistry
Registry for managing pending user interactions.
ValidationError
Validation error response.
ValidationErrorDetail
Detail about a single validation error.
WebSearchTool
Tool that performs web searches using Claude’s built-in capability.
WriteFileTool
Tool that writes files to the filesystem with permission checks.

Enums§

GrepOutputMode
Output mode for grep results.
PermissionError
Error types for permission operations.
Question
Question types supported by the tool.
RegistryError
Error type for tool registry operations.
ResultContentType
Content type for formatting tool results.
ToolResultStatus
Result status from tool execution.
ToolType
Tool type classification.
UserInteractionError
Error types for user interaction operations.
ValidationErrorCode
Error codes for validation failures.

Constants§

ASK_FOR_PERMISSIONS_TOOL_DESCRIPTION
AskForPermissions tool description constant.
ASK_FOR_PERMISSIONS_TOOL_NAME
AskForPermissions tool name constant.
ASK_FOR_PERMISSIONS_TOOL_SCHEMA
AskForPermissions tool JSON schema constant.
ASK_USER_QUESTIONS_TOOL_DESCRIPTION
AskUserQuestions tool description constant.
ASK_USER_QUESTIONS_TOOL_NAME
AskUserQuestions tool name constant.
ASK_USER_QUESTIONS_TOOL_SCHEMA
AskUserQuestions tool JSON schema constant.
BASH_TOOL_DESCRIPTION
Bash tool description constant.
BASH_TOOL_NAME
Bash tool name constant.
BASH_TOOL_SCHEMA
Bash tool JSON schema constant.
EDIT_FILE_TOOL_DESCRIPTION
EditFile tool description constant.
EDIT_FILE_TOOL_NAME
EditFile tool name constant.
EDIT_FILE_TOOL_SCHEMA
EditFile tool JSON schema constant.
GLOB_TOOL_DESCRIPTION
Glob tool description constant.
GLOB_TOOL_NAME
Glob tool name constant.
GLOB_TOOL_SCHEMA
Glob tool JSON schema constant.
GREP_TOOL_DESCRIPTION
Grep tool description constant.
GREP_TOOL_NAME
Grep tool name constant.
GREP_TOOL_SCHEMA
Grep tool JSON schema constant.
LS_TOOL_DESCRIPTION
Ls tool description constant.
LS_TOOL_NAME
Ls tool name constant.
LS_TOOL_SCHEMA
Ls tool JSON schema constant.
MULTI_EDIT_TOOL_DESCRIPTION
MultiEdit tool description constant.
MULTI_EDIT_TOOL_NAME
MultiEdit tool name constant.
MULTI_EDIT_TOOL_SCHEMA
MultiEdit tool JSON schema constant.
READ_FILE_TOOL_DESCRIPTION
ReadFile tool description constant.
READ_FILE_TOOL_NAME
ReadFile tool name constant.
READ_FILE_TOOL_SCHEMA
ReadFile tool JSON schema constant.
WEB_SEARCH_TOOL_DESCRIPTION
Web Search tool description constant.
WEB_SEARCH_TOOL_NAME
Web Search tool name constant.
WEB_SEARCH_TOOL_SCHEMA
Web Search tool JSON schema constant.
WRITE_FILE_TOOL_DESCRIPTION
WriteFile tool description constant.
WRITE_FILE_TOOL_NAME
WriteFile tool name constant.
WRITE_FILE_TOOL_SCHEMA
WriteFile tool JSON schema constant.

Traits§

Executable
Trait for executable tools.