Ask User Question
The user CANNOT see your text output or CLI prompts!
Category: design Source: MemTensor/MemOSAsk User Question: Interactive User Communication for Happycapy Skills
What Is This?
The Ask User Question skill (ask-user-question) is a tool within the Happycapy Skills platform that enables MCP (MemOS Control Program) applications to interact directly with users through UI modals. This skill is essential for any workflow that requires input, confirmation, or clarification from the user. Unlike traditional CLI prompts or text output, which are invisible to end users in this environment, this skill is the exclusive mechanism for obtaining user responses within the UI. It is strictly designed for scenarios where the application must engage the user in decision-making, preference selection, or action confirmation.
The skill is available as an open-source component:
GitHub Source
Why Use It?
Most automation or interactive applications rely on user input at critical junctures - for clarification, approval, or to resolve ambiguities. In the context of Happycapy Skills, standard output (stdout), CLI/terminal prompts, or print statements are never seen by the user. Therefore, failing to use the Ask User Question skill results in lost communication, potentially causing workflow failure or unintended actions.
Key reasons to use this skill:
- User Visibility: It is the only way to communicate with the user. All other output channels are ignored by the user interface.
- Critical User Decisions: Many actions, especially those that are destructive or sensitive (deleting files, sending emails, making payments), require explicit user approval.
- Clarification and Preferences: When the AI or automation script encounters ambiguity, this tool allows it to query the user for details, ensuring tasks are performed as intended.
- Compliance and Safety: By obtaining user confirmation or preference through the UI, you increase transparency and reduce the risk of errors.
How to Use It
To invoke the Ask User Question skill, you must provide a properly structured JSON payload. The payload describes the question(s) to be shown and the way users can answer. Here is the basic schema:
{
"questions": [{
"question": "Your question to the user",
"header": "Short label (max 12 chars)",
"options": [
{ "label": "Option 1", "description": "What this does" },
{ "label": "Option 2", "description": "What this does" }
],
"multiSelect": false
}]
}
Parameter Details
question (required):
The main text of the question to be displayed to the user.header (optional):
A short label (max 12 characters) that appears as the dialog/modal title.options (optional):
An array of selectable options. Each option consists of alabel(short name) and adescription(brief explanation).multiSelect (optional, boolean):
If set totrue, allows the user to select multiple options. Default isfalse(single-select).
Example: Asking for User Confirmation
{
"questions": [{
"question": "Do you want to delete all backup files?",
"header": "Confirm",
"options": [
{ "label": "Yes", "description": "Delete all backup files" },
{ "label": "No", "description": "Do not delete" }
],
"multiSelect": false
}]
}
Example: Gathering Preferences
{
"questions": [{
"question": "How should the files be organized?",
"header": "Organize",
"options": [
{ "label": "By Date", "description": "Sort files by modification date" },
{ "label": "By Type", "description": "Group files by file type" }
],
"multiSelect": false
}]
}
Example: Multi-Select Input
{
"questions": [{
"question": "Which features should be enabled?",
"header": "Features",
"options": [
{ "label": "Sync", "description": "Enable file synchronization" },
{ "label": "Backup", "description": "Enable regular backups" },
{ "label": "Notifications", "description": "Receive status notifications" }
],
"multiSelect": true
}]
}
When to Use It
Use the Ask User Question skill in any of these scenarios:
- Ambiguous Instructions: When the user's intent is unclear, or additional detail is needed.
- Preference Selection: When the application workflow can proceed in multiple ways based on user preference.
- Confirmation Before Actions: Especially for actions that are destructive, irreversible, or sensitive.
- Sensitive Data Handling: When working with data that requires explicit user approval for privacy or compliance reasons.
- Sequential User Input: When a workflow requires a series of guided questions.
Important Notes
- Strict Communication Rule: The user cannot see any CLI, stdout, or text output from your script or application. Only data passed via the Ask User Question skill will be shown in the UI.
- No Text Prompts: Do not assume that statements or questions printed with
print()or similar functions will reach the user. - Design for Clarity: Questions should be concise and options should be clearly labeled and described.
- Short Headers: The
headerfield is limited to 12 characters to ensure UI consistency. - User Experience: Avoid overusing modal questions as it may interrupt workflow; only ask when necessary.
- Security: Always use this skill before executing actions that could impact user data or privacy.
By following these guidelines and leveraging the Ask User Question skill appropriately, you ensure that your Happycapy Skills applications are interactive, safe, and user-friendly, fully respecting the constraints of the platform’s communication model.