generate_screen_from_text
Generates a new screen within a project from a text prompt.
Instructions for Tool Call:
This action can take a few minutes to complete. Please be patient. DO NOT RETRY.
If the tool fails with a timeout, don't retry. Instead, try to get the screen with
get_screenmethod every 30 seconds for up to 10 times before giving up.If the tool call fails due to connection error, the generation process may still succeed. Please try to get the screen with
get_screenmethod later.
Output:
output_components: Ifoutput_componentscontains text, return it to the user. Ifoutput_componentscontains suggestions (e.g. "Yes, make them all"), present these suggestions to the user. If the user accepts one of the suggestions, callgenerate_screen_from_textagain withpromptset to the accepted suggestion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Required. The input text to generate the screen from. | |
| modelId | No | Optional. The model to use for generation. | |
| projectId | Yes | Required. The project ID to generate the screen for, example: '4044680601076201931', without the `projects/` prefix. | |
| deviceType | No | The type of device that captured the screenshot, e.g., mobile or desktop. | |
| designSystem | No | Optional. The design system id to use for generating the new screen, should always be configured for design consistency, via `get_project` or `list_assets` methods. If not provided, a default design system will be used. Example: `assets/15996705518239280238`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | The project ID of the generated screen. This is the same as the input project ID. | |
| sessionId | No | The session ID of the generated screen. | |
| outputComponents | No | The generated output components. |