Skip to main content
Glama

Grammarly Text Optimizer

grammarly_optimize_text

Analyze 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

TableJSON Schema
NameRequiredDescriptionDefault
textYes
modeNoscore_only gets scores, analyze interprets them, optimize rewrites to meet thresholds.optimize
max_ai_percentNoTarget maximum AI detection percentage.
max_plagiarism_percentNoTarget maximum plagiarism percentage.
max_iterationsNoMaximum optimization iterations in optimize mode.
toneNoDesired tone of the final text.neutral
domain_hintNoShort description of the domain (e.g., 'university essay').
custom_instructionsNoExtra constraints (e.g., preserve citations, do not change code blocks).
proxy_country_codeNoISO 3166-1 alpha-2 country code for proxy (e.g., 'us', 'gb').
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable.json
max_stepsNoMaximum browser automation steps per scoring task (default 25). Prevents runaway tasks.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYesSummary or analysis notes from Claude.
historyYesHistory of scores and notes for each iteration.
live_urlNoBrowser session debug URL.
providerNoBrowser automation provider used (stagehand or browser-use).
final_textYesThe optimized or original text.
thresholds_metYesWhether the AI and plagiarism thresholds were met.
iterations_usedYesNumber of optimization iterations performed.
plagiarism_percentYesFinal plagiarism percentage from Grammarly.
ai_detection_percentYesFinal AI detection percentage from Grammarly.
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it explains the iterative nature of 'optimize' mode, mentions threshold-based rewriting, and implies external API calls to Grammarly. Annotations cover basic hints (not read-only, open world, non-idempotent, non-destructive), but the description usefully elaborates on the optimization process without contradicting them.

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

Conciseness5/5

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

The description is efficiently structured in two sentences: the first states the core purpose, and the second details the three modes with clear, front-loaded explanations. Every phrase contributes essential information without redundancy, making it easy to parse quickly.

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?

Given the tool's complexity (11 parameters, multiple modes) and rich structured data (annotations, 91% schema coverage, output schema present), the description is complete enough. It covers the key behavioral aspects (scoring vs. rewriting) and mode differences, while relying on the output schema for return values and the schema for parameter details, avoiding unnecessary duplication.

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

Parameters3/5

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

With 91% schema description coverage, the schema already documents most parameters thoroughly. The description adds minimal parameter semantics by briefly explaining the three modes, which aligns with the 'mode' parameter's enum descriptions. It doesn't provide additional meaning for other parameters beyond what the schema offers, meeting the baseline for high coverage.

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's purpose with specific verbs ('Get AI detection and plagiarism scores', 'optionally rewriting text') and resources ('from Grammarly'). It distinguishes the three operational modes (score_only, analyze, optimize) with precise functionality for each, making the purpose unambiguous even without sibling tools for comparison.

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

Usage Guidelines4/5

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

The description provides clear context for when to use each mode by explaining their distinct behaviors: 'score_only' for scores only, 'analyze' for scores plus recommendations, and 'optimize' for iterative rewriting. However, it lacks explicit guidance on when to choose this tool over alternatives (though no siblings exist) or any prerequisites/exclusions for usage.

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/BjornMelin/grammarly-mcp'

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