Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
modeYesgenerate = write new text from a prompt; rewrite = rework existing sourceText
detailNoVerbosity 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
lengthNoTarget length: short | medium | long, or a specific target word count (20-5000).
promptNoWhat to write, required when mode='generate'. Max 4000 chars.
brandIdNoBrand ID (uses active brand if omitted)
purposeNoFree-text goal of the text, e.g. 'win-back email', 'job application cover letter'. Max 200 chars.
sourceTextNoExisting text to rewrite, required when mode='rewrite'. Max 20000 chars.
voiceProfileIdNoVoice profile ID to apply. Get IDs from list_voices.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fully discloses the asynchronous behavior: returns quickly with an operationId and status, doesn't block until completion, requires polling get_job, and warns against duplicate calls while pending. It also defines what each detail level returns, giving users a clear picture of the operation's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured and front-loaded with purpose, exclusions, and async behavior. While longer than typical, it covers many necessary nuances without redundancy; however, it could be slightly tightened to improve readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having no output schema or annotations, the description covers the full async workflow, parameter semantics, return detail levels, and error/retry guidance. This makes the tool's behavior and expected outcomes remarkably complete for its complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description goes beyond the schema by explaining the semantics of mode ('generate' writes from prompt, 'rewrite' reworks sourceText), providing examples for prompt and purpose, and detailing the length and detail options. This significantly enhances the agent's ability to set parameters correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool generates or rewrites general-purpose email-style/formal text, with specific examples like follow-up emails and cover letters. It explicitly distinguishes itself from sibling tools (generate_post, rewrite_with_voice, rewrite_text), making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use and when-not-to-use guidance: 'This is NOT for social media posts — use generate_post' and 'NOT for a simple voice-only rewrite... use rewrite_with_voice or rewrite_text.' It also specifies when to reach for generate_text, such as when mode selection, a stated purpose, or target length is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bitsandtea/postking-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server