Prompt Gate (user-confirmed)
review_and_select_promptRewrites a prompt, then asks the user to pick the original, the rewrite, or cancel, returning only the approved version and never auto-selecting.
Instructions
Generates a rewritten version of the prompt, then asks the user to choose: use original, use rewritten, or cancel. Returns only the approved prompt. Cancellation is a distinct outcome and never exposes an approved prompt.
If the client does not support MCP elicitation, the tool returns a distinct "pending_user_selection" result: it shows both versions in plain text with the three numbered choices and asks the agent to re-call this tool with selection set to the user's choice ("original" / "rewritten" / "cancel"). Never auto-select.
CALLING GUIDE (for the LLM):
FIRST call (rewrite): pass prompt + context; do NOT pass
selection. ALWAYS pass a shortcontext(1-3 sentences) summarizing the conversation so far.If the first call returns status "pending_user_selection": show the two versions to the user, ask which to use, then call again with the SAME inputs PLUS
selectionset to "original", "rewritten", or "cancel" matching the user's choice.Choose
rewrite_levelto fit the task:lightfor quick one-shot answers,balanced(default) for most coding/research work,detailedwhen the user explicitly wants a fully-specified spec.Pass
languageonly when the user wants the rewritten prompt in a language different from the original. Do NOT switch the language on your own judgment — the server auto-detects the prompt language and preserves it by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The original prompt to review. This is the user's latest message only. | |
| context | Yes | 1-3 sentences summarizing the conversation/session so far (what the user has asked, what files/topics are in play, what was decided). STRONGLY RECOMMENDED: pass this on every call so the rewrite is grounded in prior context. Omit only for brand-new sessions with no history. | |
| language | No | Output language, e.g. "english" or "vietnamese". ONLY pass this when the user explicitly asks for a different output language. If the user has not asked, omit it — the server auto-detects the prompt's language and preserves it. Do NOT pass "english" just to "improve clarity"; that switches the output language and is a drift. | |
| selection | No | ONLY for the SECOND call of a pending_user_selection flow: the user's explicit choice after the server could not show an interactive picker. On the first call (rewrite) this must be omitted. Values: "original", "rewritten", "cancel". Never auto-select; pass it only after the user has chosen. | |
| rewrite_level | No | How much enrichment to apply. "light" = minimal; "balanced" (default) = add missing structure/context/criteria; "detailed" = full spec with acceptance criteria. | |
| rewritten_prompt | No | ONLY for the SECOND call of a pending_user_selection flow: the exact rewritten text the user saw in the first call's "pending_user_selection" result. Omit on the first call. When present with selection="rewritten", this is what gets approved — so the user approves exactly what they read, not a re-rewrite. |