Grammarly Text Optimizer
grammarly_optimize_textAnalyze text for AI detection and plagiarism scores, then rewrite content to meet specified thresholds for humanized output.
Instructions
Get AI detection and plagiarism scores from Grammarly, optionally rewriting text with the configured LLM to reduce scores. Modes: 'score_only' (scores only), 'analyze' (scores + recommendations), 'optimize' (iterative rewriting to meet thresholds).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| mode | No | score_only gets scores, analyze interprets them, optimize rewrites to meet thresholds. | optimize |
| max_ai_percent | No | Target maximum AI detection percentage. | |
| max_plagiarism_percent | No | Target maximum plagiarism percentage. | |
| max_iterations | No | Maximum optimization iterations in optimize mode. | |
| tone | No | Desired tone of the final text. | neutral |
| domain_hint | No | Short description of the domain (e.g., 'university essay'). | |
| custom_instructions | No | Extra constraints (e.g., preserve citations, do not change code blocks). | |
| proxy_country_code | No | ISO 3166-1 alpha-2 country code for proxy (e.g., 'us', 'gb'). | |
| response_format | No | Output format: 'json' for structured data, 'markdown' for human-readable. | json |
| max_steps | No | Maximum browser automation steps per scoring task (default 25). Prevents runaway tasks. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | Summary or analysis notes from Claude. | |
| history | Yes | History of scores and notes for each iteration. | |
| live_url | No | Browser session debug URL. | |
| provider | No | Browser automation provider used (stagehand or browser-use). | |
| final_text | Yes | The optimized or original text. | |
| thresholds_met | Yes | Whether the AI and plagiarism thresholds were met. | |
| iterations_used | Yes | Number of optimization iterations performed. | |
| plagiarism_percent | Yes | Final plagiarism percentage from Grammarly. | |
| ai_detection_percent | Yes | Final AI detection percentage from Grammarly. |