Skip to main content
Glama
AutomateLab-tech

automatelab-ai-seo

Official

Rewrite for Generative Engine Optimization

rewrite_geo
Read-only

Rewrite content for Generative Engine Optimization, making it entity-rich, comparison-ready, and synthesis-friendly for AI answers across sources. Supply a target query plus URL or text.

Instructions

Rewrite a content block for Generative Engine Optimization: entity-rich, comparison-ready, synthesis-friendly. Tuned for surfaces that summarize across sources (Perplexity, Google AI Mode, Claude search).

Read-only on input. Does NOT write back to the source URL - returns the rewritten content as a string.

This tool delegates the actual rewrite to the calling LLM via MCP sampling - it does not call any external API itself. The MCP host's model produces the rewrite. Output may vary across runs (model-dependent).

When to use: optimizing for synthesis-style answers across multiple sources. For direct-answer (BLUF + FAQ) optimization on a single page, use rewrite_aeo instead.

Either url or text must be provided. target_query is required.

Input Schema

NameRequiredDescriptionDefault
urlNoPublic URL whose content should be fetched and rewritten. Either this OR `text` is required.
textNoRaw content to rewrite directly. Either this OR `url` is required.
max_wordsNoSoft word budget. Default 1500. Range 100-5000.
target_queryYesThe user query the rewrite should answer. Required - drives entity selection and comparison framing.
respect_robotsNoIf true (default), respect robots.txt when fetching `url`. Ignored when `text` is used.
add_comparison_tableNoIf true, inject an explicit X-vs-Y comparison table into the rewrite (useful for `X vs Y` queries). Default false.

Output Schema

NameRequiredDescriptionDefault
modeYes
after_scoreYes
before_scoreYes
changes_madeYes
rewritten_textYes
schema_additionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • addedOutput schema / properties / after_score
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / before_score
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / changes_made
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / format
      Removed value: -{
      -  "description": "Output format (article, faq, howto, comparison).",
      -  "type": "string"
      -}
    • addedOutput schema / properties / mode
      Added value: +{
      +  "enum": [
      +    "sampling",
      +    "prompt_template"
      +  ],
      +  "type": "string"
      +}
    • removedOutput schema / properties / notes
      Removed value: -{
      -  "description": "Notes from the rewrite (e.g. truncations, format adjustments).",
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / rewritten
      Removed value: -{
      -  "description": "The rewritten content. The caller decides where to publish it.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / rewritten_text
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / schema_additions
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / source
      Removed value: -{
      -  "enum": [
      -    "url",
      -    "text"
      -  ],
      -  "type": "string"
      -}
    • removedOutput schema / properties / target_query
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / url
      Removed value: -{
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "source",
      -  "url",
      -  "target_query",
      -  "rewritten",
      -  "notes"
      -]New value: +[
      +  "rewritten_text",
      +  "schema_additions",
      +  "changes_made",
      +  "before_score",
      +  "after_score",
      +  "mode"
      +]
  2. Addedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=false and openWorldHint=true; the description goes further by disclosing that no write-back occurs, that the rewrite is delegated to the host LLM via MCP sampling rather than an external API, and that output varies across runs. These are behavioral facts the annotations cannot express.

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?

Front-loads what the tool does, then the read-only/no-write-back guarantee, then the non-obvious sampling behavior, then usage guidance. Mostly tight, though the sampling/determinism paragraph could be compressed into fewer words without loss.

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?

An output schema exists so return-value explanation is unnecessary; the description instead covers the non-obvious execution model (host LLM sampling), determinism caveat, read-only semantics, and sibling routing. Nothing an agent needs to invoke it correctly is missing.

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?

Schema description coverage is 100%, so all six parameters (url, text, max_words, target_query, respect_robots, add_comparison_table) are already documented in the schema. The description only restates the either/or url-vs-text rule and target_query requirement, adding no syntax or format detail beyond the schema.

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?

States a specific verb (rewrite) and resource (content block) plus the optimization target (GEO), and explicitly names the sibling it is not (`rewrite_aeo`). An agent can distinguish it from the AEO variant without opening either schema.

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?

Provides an explicit 'When to use' clause tied to synthesis-style optimization and routes the agent to `rewrite_aeo` for direct-answer/BLUF+FAQ optimization. The alternative and the condition selecting it are both stated.

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