Skip to main content
Glama
sparrow84001

SEO, AEO, GEO & Digital Marketing Audit + Safe Fix MCP Server

seo_generate_code_fix

Generate framework-aware code fixes for missing titles, meta descriptions, canonical URLs, JSON-LD schemas, and WebMCP discovery links, with unified diff preview before applying.

Instructions

Generates framework-aware code fixes (Laravel Blade, Next.js App/Pages Router, HTML, PHP, Astro, Svelte) for missing titles, meta descriptions, canonical URLs, JSON-LD schemas, and WebMCP discovery links with unified diff preview.

USAGE GUIDELINES:

  • Use after audit tools detect specific SEO, schema, or WebMCP issues in a source file.

  • Do NOT use for general code refactoring unrelated to metadata, schema, or SEO tags.

  • Always run 'seo_validate_code_fix' immediately after applying changes to verify syntax and prevent duplicate tags.

BEHAVIORAL TRANSPARENCY:

  • Non-destructive by default: Returns unified diff preview without modifying files.

  • Modifies disk ONLY when 'applyDirectly' is explicitly set to true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoNew or updated title tag text.
filePathYesPath to source code file to modify (e.g., "./pages/index.tsx" or "resources/views/welcome.blade.php").
canonicalUrlNoCanonical URL (e.g. "https://example.com/page").
jsonLdSchemaNoValid Schema.org JSON-LD object to inject into HTML head.
applyDirectlyNoWhether to apply changes directly to disk. Default: false (returns diff preview only for review).
webMcpEndpointNoWebMCP endpoint URL to inject into HTML head via <link rel="mcp-server" /> (e.g. "/mcp" or "/api/mcp").
metaDescriptionNoNew or updated meta description string.
addWebMcpDiscoveryNoWhether to inject standard <link rel="mcp-server" href="/mcp" /> tag. Default: false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.1.1
    • changedInput schema / properties / addWebMcpDiscovery / description
      Previous value: -"Whether to inject standard <link rel=\"mcp-server\" href=\"/mcp\" /> tag."New value: +"Whether to inject standard <link rel=\"mcp-server\" href=\"/mcp\" /> tag. Default: false."
    • changedInput schema / properties / applyDirectly / description
      Previous value: -"Whether to write changes directly to disk (default: false)."New value: +"Whether to apply changes directly to disk. Default: false (returns diff preview only for review)."
    • changedInput schema / properties / canonicalUrl / description
      Previous value: -"Canonical URL."New value: +"Canonical URL (e.g. \"https://example.com/page\")."
    • changedInput schema / properties / filePath / description
      Previous value: -"Path to the source file to modify."New value: +"Path to source code file to modify (e.g., \"./pages/index.tsx\" or \"resources/views/welcome.blade.php\")."
    • changedInput schema / properties / jsonLdSchema / description
      Previous value: -"Schema.org JSON-LD object to inject."New value: +"Valid Schema.org JSON-LD object to inject into HTML head."
    • changedInput schema / properties / metaDescription / description
      Previous value: -"New or updated meta description."New value: +"New or updated meta description string."
    • changedInput schema / properties / title / description
      Previous value: -"New or updated title tag."New value: +"New or updated title tag text."
    • changedInput schema / properties / webMcpEndpoint / description
      Previous value: -"WebMCP endpoint URL to inject into HTML <head> via <link rel=\"mcp-server\" /> (e.g. /mcp or /api/mcp)."New value: +"WebMCP endpoint URL to inject into HTML head via <link rel=\"mcp-server\" /> (e.g. \"/mcp\" or \"/api/mcp\")."
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral burden. It discloses the most critical trait: the tool is non-destructive by default and only modifies disk when applyDirectly is explicitly true. It also clarifies that the default output is a unified diff preview. A note about error handling or handling of pre-existing tags would be additional value, but the core side-effect behavior is well covered.

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 organized into overview, usage guidelines, and behavioral transparency sections. Every sentence adds distinct value with no filler or repetition. The most important scoping and safety information is front-loaded, and the bullet-list format makes the guidance easy for an agent to parse.

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

Completeness4/5

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

For a tool with 8 parameters, no output schema, and no annotations, the description covers the essential context: what it fixes, which frameworks it supports, when to use it, and what the default output and side-effect behavior are. It also points to seo_validate_code_fix as the required follow-up. A brief note on behavior when no fixes are generated would push it to a 5, but nothing critical 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 the parameters are already thoroughly documented in the input schema. The description adds helpful context by naming the categories of fixes and emphasizing framework-awareness, but it does not add parameter-interdependency or syntax details beyond the schema. This meets the baseline-3 expectation for fully covered schemas.

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 names the exact action ('Generates framework-aware code fixes') and enumerates the target resources (missing titles, meta descriptions, canonical URLs, JSON-LD schemas, WebMCP discovery links) plus the supported frameworks (Laravel Blade, Next.js, HTML, PHP, Astro, Svelte). It also identifies the unified diff preview output, which sets clear expectations. This clearly distinguishes it from the sibling audit, sitemap, and validation tools.

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?

Explicitly states when to use the tool ('Use after audit tools detect...') and provides a direct exclusion ('Do NOT use for general code refactoring unrelated to metadata, schema, or SEO tags'). It also gives a sequencing instruction to run seo_validate_code_fix immediately after applying changes, which is highly actionable for an agent.

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