Skip to main content
Glama
sparrow84001

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

seo_validate_code_fix

Validates modified source files for syntax errors, duplicate meta/title tags, and broken JSON-LD, then calculates before vs after SEO score improvements.

Instructions

Validates modified source files against syntax errors, duplicate meta/title tags, broken JSON-LD syntax, and calculates Before vs After SEO score improvements.

USAGE GUIDELINES:

  • Use immediately after generating or applying a code fix via 'seo_generate_code_fix' to verify correctness.

  • Do NOT use as a standalone audit on unedited files; use 'seo_audit_onpage' or 'seo_generate_full_audit' instead.

BEHAVIORAL TRANSPARENCY:

  • Safe, read-only file validation. Reads the modified file and performs AST/regex checks without making further modifications.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the modified source code file to validate.
beforeScoresNoOptional map of previous dimension scores (0-100) to compute exact before vs after score delta.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / beforeScores / description
      Previous value: -"Optional previous dimension scores to compute score diff."New value: +"Optional map of previous dimension scores (0-100) to compute exact before vs after score delta."
    • changedInput schema / properties / filePath / description
      Previous value: -"Path to modified source file."New value: +"Path to the modified source code file to validate."
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and clearly states the operation is safe, read-only, reads the modified file, performs AST/regex checks, and makes no further modifications. This covers the critical non-mutation trait and adds method detail; it is only slightly limited by not describing the output/return 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 purpose statement is front-loaded and the labeled Usage/Behavior sections make the definition scannable. There is minor redundancy in repeating 'modified file' and 'read-only/no modifications,' but the description remains relatively compact for the amount of guidance it provides.

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

Completeness3/5

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

The definition covers purpose, usage, and safety well, but there is no output schema and the description does not specify return format or where the 'Before' score comes from. For a tool whose whole point is Before/After scores, this leaves some ambiguity; still, an agent can correctly invoke it with a file path and the provided timing guidance.

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% and the filePath parameter already has a clear schema description, so the baseline is 3. The description reinforces that the path should point to a modified file, but it does not add parameter-specific syntax, path format, or optional-parameter guidance beyond what the schema provides.

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 uses a specific verb ('Validates') with a defined resource ('modified source files') and enumerates concrete checks: syntax errors, duplicate meta/title tags, broken JSON-LD, and Before/After SEO score improvements. This clearly distinguishes it from the audit siblings, which are for unedited or standalone analysis.

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 usage section explicitly states when to use the tool (immediately after seo_generate_code_fix), and it explicitly says when not to use it (standalone audit on unedited files) while naming alternatives (seo_audit_onpage, seo_generate_full_audit). This is model behavior for routing an agent to the correct sibling.

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