Skip to main content

Attributes

Custom tools support comprehensive configuration through the @tool decorator:
AttributeTypeDefaultDescription
requires_confirmationboolFalseRequire user confirmation before execution
requires_user_inputboolFalsePrompt user for input during execution
user_input_fieldsList[str] | NoneNoneSpecify which fields require user input
external_executionboolFalseMark tool for external execution
show_resultboolFalseDisplay output to user instead of sending to LLM
stop_after_tool_callboolFalseTerminate agent run after tool execution
sequentialboolFalseEnforce sequential execution (no parallelization)
cache_resultsboolFalseEnable result caching
cache_dirstr | NoneNoneDirectory for cache storage
cache_ttlint | NoneNoneCache time-to-live in seconds
tool_hooksDict | NoneNoneBefore/after execution hooks
max_retriesint0Maximum retry attempts
timeoutint | NoneNoneExecution timeout in seconds
strictboolFalseEnforce strict JSON schema validation
docstring_formatstr"auto"Docstring parsing format: ‘google’, ‘numpy’, ‘sphinx’, ‘auto’