Generate new prompt suggestions for a group
generate_prompt_suggestionsSchedules a background run that analyzes a project prompt group's gaps, drafts and scores candidate prompt suggestions, and returns a run ID for polling pending proposals.
Instructions
Asks PromptEye to propose new prompts for one prompt group of the project, the same cycle the app runs when Generate is pressed on a group: it reads what the group is missing, drafts candidate phrases, checks their demand, expands them into questions and scores each one. PromptEye generates the prompts a project tracks: it works out which questions carry demand and phrases them the way people actually put questions to AI assistants, then proposes each one with the gap in the funnel it fills, the demand behind it, how close to a purchase it is asked and how well it fits the brand. list_prompt_suggestions returns those, ready to be accepted.
Scheduling a run is instant; the cycle itself runs in the background for a minute or more and is not waited on here. Poll get_prompt_suggestion_availability with the groupId afterwards to wait for the run to finish and discover what it produced. Call list_prompt_suggestions to read the pending suggestions generated; it returns only suggestions awaiting a decision, excluding ones that have already been accepted or rejected.
A run is not always worth scheduling — the group might already be healthy, the plan's paid work might not currently cover it, or the last run might still have proposals awaiting a decision. Then nothing is scheduled and runId comes back null with skipped saying why; that is not an error. A run already in progress, or no free plan slots left, is refused by the API instead — call get_prompt_suggestion_availability first to know which case applies.
When skipped is nothing_to_suggest, tell the user why: suggestions need at least 5 active prompts in the group already measured and scored for purchase intent, or at least 2 active prompts with a computed business priority. In a new project add prompts, wait for their first measurement, then generate again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | Id of the prompt group, as list_prompt_groups reports it. | |
| projectId | Yes | The project to work on — its id from list_projects. Required on every call, so that parallel conversations never read or write each other's project. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runId | Yes | Id of the run that was scheduled. null = nothing was scheduled, see skipped. | |
| skipped | Yes | Why no run was scheduled; set exactly when runId is null. not_eligible = the project's plan does not currently pay for background work, cooldown = the last run finished less than 7 days ago and its proposals still await a decision, nothing_to_suggest = the group is already healthy: no funnel gap to fill and nothing worth imitating. In a new group it usually means too few measured prompts: a run needs at least 5 active prompts already measured and scored for purchase intent, or at least 2 active prompts with a computed business priority. Add prompts, wait for their first measurement, then try again. |