Quick Start
1
Enable Clarify
2
With Custom Handler
How It Works
Channel Integration
CLI Usage
Bot Usage
Custom Context Handler
Handler Resolution
The tool uses this priority order for handling questions:- Context Handler:
kwargs["ctx"]["clarify_handler"](highest priority) - Tool Handler:
self.handler(defaultClarifyHandler()) - Fallback: Returns guidance message when no interactive channel available
Configuration Options
Tool Schema
Bot Auto-Approval
clarify tool is included in the bot’s default auto-approve list, so it won’t require manual approval in bot environments.
Common Patterns
Progressive Clarification
Context-Aware Questions
Fallback Behavior
Best Practices
Use Sparingly
Use Sparingly
Only call clarify when you genuinely cannot proceed without user input. Don’t ask for preferences that have reasonable defaults.Good: “Which API endpoint format?” when building an API
Bad: “Should I use descriptive variable names?” (obvious default)
Provide Clear Choices
Provide Clear Choices
When possible, offer specific choices rather than open-ended questions.Good:
choices=["fastapi", "flask", "django"]
Bad: "What Python web framework should I use?" (no choices)Handle Fallbacks Gracefully
Handle Fallbacks Gracefully
Always check if the response indicates no interactive channel and proceed with sensible defaults.
Context-Aware Questions
Context-Aware Questions
Frame questions with enough context for users to make informed decisions.Good: “Which authentication method for your user API?”
Bad: “Which auth?” (unclear context)
Related
Ask Conversation
Ask another chat (not the current user) and wait for its reply
Tools Overview
Core tool system and custom tools
Agent Configuration
Agent setup and tool integration

