{
  "version": "1.1",
  "name": "SIS SEO Intelligence System — WebMCP Server",
  "description": "Servidor MCP SSE y WebMCP de SIS SEO Intelligence System, con 10 herramientas de auditoría SEO, métricas SOSTAC, evaluación agéntica y análisis de citabilidad con IA.",
  "server": {
    "type": "sse",
    "url": "/mcp",
    "jsonrpc_url": "/mcp"
  },
  "tools": [
    {
      "name": "audit_website_seo",
      "description": "Ejecuta auditoría técnica SEO en tiempo real examinando HTTP status, metatags, TTFB, Robots.txt, Sitemap y descubrimiento agéntico.",
      "deterministic": true,
      "estimated_latency": "3-8s",
      "depends_on": [],
      "model": null,
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": { "type": "string", "description": "URL absoluta del sitio web a auditar (ej. https://ejemplo.com)" }
        },
        "required": ["url"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "url": { "type": "string" },
          "statusCode": { "type": "number" },
          "ttfbMs": { "type": "number" },
          "hasTitle": { "type": "boolean" },
          "hasMetaDescription": { "type": "boolean" },
          "hasH1": { "type": "boolean" },
          "hasLlmsTxt": { "type": "boolean" },
          "hasAiPlugin": { "type": "boolean" },
          "hasMcpSse": { "type": "boolean" },
          "technicalScore": { "type": "number" },
          "issues": { "type": "array", "items": { "type": "string" } },
          "recommendations": { "type": "array", "items": { "type": "string" } }
        }
      }
    },
    {
      "name": "webmcp_audit",
      "description": "Audita el nivel de madurez e interoperabilidad agéntica (WebMCP Readiness WRS Score 0-100) para crawlers e IA.",
      "deterministic": true,
      "estimated_latency": "2-5s",
      "depends_on": [],
      "model": null,
      "inputSchema": {
        "type": "object",
        "properties": {
          "url": { "type": "string", "description": "URL del sitio web a evaluar" }
        },
        "required": ["url"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "url": { "type": "string" },
          "wrsScore": { "type": "number" },
          "level": { "type": "string" },
          "pillars": {
            "type": "object",
            "properties": {
              "crawlers": { "type": "object" },
              "discovery": { "type": "object" },
              "semantics": { "type": "object" },
              "webmcp": { "type": "object" }
            }
          }
        }
      }
    },
    {
      "name": "eval_posicion_cero",
      "description": "Calcula el score agéntico Posición Cero™ v1.4 multiplicando IPP (Presencia Propietaria) x S (Semántica) x WRS.",
      "deterministic": true,
      "estimated_latency": "2-4s",
      "depends_on": [],
      "model": null,
      "inputSchema": {
        "type": "object",
        "properties": {
          "target": { "type": "string", "description": "Dominio o URL objetivo" },
          "name": { "type": "string", "description": "Nombre de la marca comercial" }
        },
        "required": ["target"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "ippScore": { "type": "number" },
          "semanticScore": { "type": "number" },
          "wrsScore": { "type": "number" },
          "posicionCeroScore": { "type": "number" },
          "verdict": { "type": "string" }
        }
      }
    },
    {
      "name": "get_sostac_metrics",
      "description": "Obtiene las métricas del radar estratégico SOSTAC®, porcentaje de avance por fases y estado del proyecto activo.",
      "deterministic": true,
      "estimated_latency": "1-2s",
      "depends_on": [],
      "model": null,
      "inputSchema": {
        "type": "object",
        "properties": {
          "profileId": { "type": "string", "description": "ID opcional del proyecto" }
        }
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "profileName": { "type": "string" },
          "overallProgress": { "type": "number" },
          "sostacScores": {
            "type": "object",
            "properties": {
              "situation": { "type": "number" },
              "objectives": { "type": "number" },
              "strategy": { "type": "number" },
              "tactics": { "type": "number" },
              "action": { "type": "number" },
              "control": { "type": "number" }
            }
          }
        }
      }
    },
    {
      "name": "generate_meta_tags",
      "description": "Genera opciones persuasivas de Title y Meta Description optimizadas para CTR y palabras clave con Gemini 3.6 Flash.",
      "deterministic": false,
      "estimated_latency": "2-4s",
      "depends_on": [],
      "model": "Gemini 3.6 Flash",
      "inputSchema": {
        "type": "object",
        "properties": {
          "keyword": { "type": "string", "description": "Palabra clave principal" },
          "businessDescription": { "type": "string", "description": "Descripción del negocio o página" },
          "pageType": { "type": "string", "description": "Tipo de página (landing, blog, servicio)" },
          "tone": { "type": "string", "description": "Tono de comunicación (profesional, persuasivo, técnico)" }
        },
        "required": ["keyword", "businessDescription"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "titleOptions": { "type": "array", "items": { "type": "string" } },
          "metaDescriptionOptions": { "type": "array", "items": { "type": "string" } },
          "reasoning": { "type": "string" }
        }
      }
    },
    {
      "name": "analyze_page_content",
      "description": "Evalúa la legibilidad, densidad semántica de keywords y optimización SEO del texto ingresado con Gemini 3.6 Flash.",
      "deterministic": false,
      "estimated_latency": "3-6s",
      "depends_on": [],
      "model": "Gemini 3.6 Flash",
      "inputSchema": {
        "type": "object",
        "properties": {
          "text": { "type": "string", "description": "Texto o artículo a analizar" },
          "targetKeyword": { "type": "string", "description": "Palabra clave objetivo" }
        },
        "required": ["text"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "readabilityScore": { "type": "number" },
          "keywordDensityPercent": { "type": "number" },
          "headingStructureHealth": { "type": "string" },
          "actionableRecommendations": { "type": "array", "items": { "type": "string" } }
        }
      }
    },
    {
      "name": "generate_schema_jsonld",
      "description": "Crea código marcado JSON-LD estandarizado para Schema.org (Organization, LocalBusiness, Article, Product, Service, FAQ) validado.",
      "deterministic": false,
      "estimated_latency": "2-4s",
      "depends_on": [],
      "model": "Gemini 3.6 Flash",
      "inputSchema": {
        "type": "object",
        "properties": {
          "schemaType": { "type": "string", "description": "Organization, LocalBusiness, Article, FAQPage, Product, Service" },
          "businessName": { "type": "string" },
          "url": { "type": "string" },
          "details": { "type": "string" }
        },
        "required": ["schemaType", "businessName", "url"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "jsonld": { "type": "object" },
          "validationStatus": { "type": "string" }
        }
      }
    },
    {
      "name": "generate_seo_brief",
      "description": "Genera una guía/brief estratégico de redacción SEO con estructura de encabezados H1-H3, intenciones de búsqueda y lista de LSI keywords.",
      "deterministic": false,
      "estimated_latency": "4-8s",
      "depends_on": [],
      "model": "Gemini 3.6 Flash",
      "inputSchema": {
        "type": "object",
        "properties": {
          "topic": { "type": "string", "description": "Tema principal del artículo" },
          "targetAudience": { "type": "string" },
          "targetKeywords": { "type": "array", "items": { "type": "string" } }
        },
        "required": ["topic"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "h1Title": { "type": "string" },
          "outline": { "type": "array", "items": { "type": "string" } },
          "lsiKeywords": { "type": "array", "items": { "type": "string" } },
          "targetWordCount": { "type": "number" },
          "toneAndStyle": { "type": "string" }
        }
      }
    },
    {
      "name": "evaluate_ia_readiness",
      "description": "Evalúa la preparación de un dominio para ser accedido, indexado y citado por agentes de IA: permisos de crawlers (GPTBot, ClaudeBot, PerplexityBot, Google-Extended) en robots.txt, presencia de /llms.txt, marcado Schema.org y manifiestos WebMCP. Devuelve un score global, desglose por pilar y un plan de acción priorizado.",
      "deterministic": false,
      "estimated_latency": "3-7s",
      "depends_on": [],
      "model": "Gemini 3.6 Flash",
      "fallback": "Evaluador heurístico determinístico de servidor (HTTP 200 garantizado, ver campo 'source')",
      "endpoint": "POST /api/seo/ai/evaluate-readiness",
      "inputSchema": {
        "type": "object",
        "properties": {
          "targetDomain": { "type": "string", "description": "Dominio o URL a evaluar (ej. ejemplo.com)" }
        },
        "required": ["targetDomain"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "target": { "type": "string" },
          "totalScore": { "type": "number" },
          "pillars": {
            "type": "object",
            "properties": {
              "crawlers": { "type": "object", "properties": { "score": { "type": "number" }, "status": { "type": "string" }, "details": { "type": "string" } } },
              "discovery": { "type": "object", "properties": { "score": { "type": "number" }, "status": { "type": "string" }, "details": { "type": "string" } } },
              "semantics": { "type": "object", "properties": { "score": { "type": "number" }, "status": { "type": "string" }, "details": { "type": "string" } } },
              "mcpApis": { "type": "object", "properties": { "score": { "type": "number" }, "status": { "type": "string" }, "details": { "type": "string" } } }
            }
          },
          "criticalGaps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string" },
                "category": { "type": "string" },
                "title": { "type": "string" },
                "impact": { "type": "string", "enum": ["ALTO", "MEDIO", "BAJO"] },
                "fix": { "type": "string" }
              }
            }
          },
          "actionPlan": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step": { "type": "number" },
                "title": { "type": "string" },
                "detail": { "type": "string" },
                "estimate": { "type": "string" }
              }
            }
          },
          "source": { "type": "string", "enum": ["ai", "heuristic_fallback"], "description": "Origen real del análisis: 'ai' si Gemini respondió en vivo, 'heuristic_fallback' si se usó el evaluador determinístico local." }
        }
      }
    },
    {
      "name": "evaluate_citability",
      "description": "Analiza un texto (artículo, blog, landing) y calcula su 'Citabilidad' — qué tan fácil es para un LLM extraer datos concretos y citar la fuente sin alucinar — sobre 8 criterios: estructura, datos citables, fuentes de autoridad, respuestas directas, E-E-A-T, ejemplos concretos, formato AI-friendly y citabilidad sintáctica.",
      "deterministic": false,
      "estimated_latency": "2-6s",
      "depends_on": [],
      "model": "Gemini 3.6 Flash",
      "fallback": "Evaluador heurístico determinístico de servidor (HTTP 200 garantizado, ver campo 'source')",
      "endpoint": "POST /api/seo/ai/evaluate-citability",
      "inputSchema": {
        "type": "object",
        "properties": {
          "content": { "type": "string", "description": "Texto a analizar, mínimo 50 caracteres" }
        },
        "required": ["content"]
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "score": { "type": "number" },
          "verdict": { "type": "string", "enum": ["Excelente", "Bueno", "Aceptable", "Deficiente"] },
          "description": { "type": "string" },
          "criteria": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": { "type": "string" },
                "score": { "type": "number" },
                "reason": { "type": "string" },
                "level": { "type": "string", "enum": ["success", "warning", "critical"] }
              }
            }
          },
          "previews": {
            "type": "object",
            "properties": {
              "chatgpt": { "type": "string" },
              "gemini": { "type": "string" }
            }
          },
          "gaps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": { "type": "string" },
                "impact": { "type": "string", "enum": ["ALTO", "MEDIO", "BAJO"] },
                "effort": { "type": "string", "enum": ["ALTO", "MEDIO", "BAJO"] },
                "actions": { "type": "array", "items": { "type": "string" } }
              }
            }
          },
          "impact": { "type": "string", "description": "Incremento potencial estimado en citaciones, ej. '+45%'" },
          "source": { "type": "string", "enum": ["ai", "heuristic_fallback"], "description": "Origen real del análisis: 'ai' si Gemini respondió en vivo, 'heuristic_fallback' si se usó el evaluador determinístico local." }
        }
      }
    }
  ]
}
