# Ask User Source: https://docs.chainlit.io/advanced-features/ask-user The ask APIs prompt the user for input. Depending on the API, the user input can be a string, a file, pick an action or fill a form. Until the user provides an input, both the UI and your code will be blocked. ## Available Ask APIs Ask the user for a string input. Ask the user to upload a file. Ask the user to pick an action. Ask the user to complete a custom form. ## Interactive Consent-Gated Forms The `AskElementMessage` API enables agents to send interactive, consent-gated UI components to users. This feature is particularly useful for: * **Compliance workflows** where explicit user consent is required * **Data review** scenarios where users need to review and modify AI-generated data * **Form completion** with pre-filled values for user confirmation * **Audit trails** for sensitive operations The flow works as follows: 1. **Agent** calls a consent-gated tool (e.g., expense logging API) 2. Backend sends a **CustomElement** to the frontend with editable fields and timeout 3. **User** modifies or confirms the pre-filled values and submits 4. Backend receives the **updated props** and proceeds with the tool call using user-approved data This pattern blocks further chat interactions until user input is received, preventing ambiguous or unauthorized actions. # Chat Profiles Source: https://docs.chainlit.io/advanced-features/chat-profiles Chat Profiles are useful if you want to let your users choose from a list of predefined configured assistants. For example, you can define a chat profile for a support chat, a sales chat, or a chat for a specific product. Learn how to define chat profiles. # Chat Settings Source: https://docs.chainlit.io/advanced-features/chat-settings Chat settings are useful to let each user configure their chat experience given a set of options. ## How it works Check the chat settings [API reference](/api-reference/chat-settings) to learn how to configure it. ## Preview If chat settings are set, a new button will appear in the chat bar. OpenChatSettings Clicking on this button will open the settings panel. All settings are editable by the user. Once settings are updated, an event is sent to the Chainlit server so the application can react to the update. ## Example Check out this example from the cookbook that uses this feature: [https://github.com/Chainlit/cookbook/tree/main/image-gen](https://github.com/Chainlit/cookbook/tree/main/image-gen) # MCP Source: https://docs.chainlit.io/advanced-features/mcp Model Control Protocol (MCP) allows you to integrate external tool providers with your Chainlit application. This enables your AI models to use tools through standardized interfaces. ## Overview MCP provides a mechanism for Chainlit applications to connect to either server-sent events (SSE) or streamable HTTP based services, or command-line (stdio) based tools. Once connected, your application can discover available tools, execute them, and integrate their responses into your application's flow. End to end cookbook example showcasing MCP tool calling with Claude.