generate_text
Generate or rewrite email-style formal text like follow-ups, cover letters, outreach. Pick generate for new content from a prompt or rewrite to transform existing text with target length.
Instructions
Generate or rewrite general-purpose, email-style/formal text — follow-up emails, cover letters, outreach messages, formal notes, etc. Returns quickly with an operationId and a 'still_generating' or 'completed' status — it does NOT block until generation fully finishes. This is NOT for social media posts — use generate_post for those. This is also NOT for a simple voice-only rewrite of existing text with no other options — for that, use rewrite_with_voice or rewrite_text instead. Reach for generate_text when you need mode selection (generate vs rewrite), a stated purpose, a target length, or when there's no source text at all (mode='generate'). mode='generate' writes new text from a prompt (what to write, e.g. 'a follow-up email after a sales call, polite but direct'). mode='rewrite' rewrites existing sourceText into a new form/tone. purpose is optional free text describing the goal, e.g. 'win-back email' or 'job application cover letter'. length can be short | medium | long, or a specific target word count (20-5000). Supports detail param: short=status+wordCount only, medium=truncated content (500 chars)+wordCount (default), full=raw result including content, aiDetectionScore, burstinessScore, promptLogId, wordCount. If it returns status 'still_generating', the job is still running server-side — poll get_job with the returned operationId (wait:true) until state is 'completed', then read the text from the operation's result. Do NOT call generate_text again for the same request while it's pending — retrying wastes effort and may create duplicate work.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | generate = write new text from a prompt; rewrite = rework existing sourceText | |
| detail | No | Verbosity of returned item(s): "short" = id + primary label + status (cheap list scan); "medium" = key summary fields + counts (a useful glance); "full" = the complete object. Default "full". Lists default to "short" — to zoom into one item, call its get/view tool with detail="medium" or "full". | full |
| length | No | Target length: short | medium | long, or a specific target word count (20-5000). | |
| prompt | No | What to write, required when mode='generate'. Max 4000 chars. | |
| brandId | No | Brand ID (uses active brand if omitted) | |
| purpose | No | Free-text goal of the text, e.g. 'win-back email', 'job application cover letter'. Max 200 chars. | |
| sourceText | No | Existing text to rewrite, required when mode='rewrite'. Max 20000 chars. | |
| voiceProfileId | No | Voice profile ID to apply. Get IDs from list_voices. |