{
  "version": 1,
  "sdk_version": "0.24.0",
  "path": "/mcp",
  "auth": {
    "type": "oauth",
    "issuer": "https://vbtwupryyrgaudznkmel.supabase.co/auth/v1",
    "accepted_audiences": [
      "authenticated"
    ]
  },
  "mcp": {
    "server": {
      "name": "inversion-consciente-mcp",
      "version": "0.2.0",
      "title": "Inversión Consciente"
    },
    "tools": [
      {
        "name": "list_articles",
        "title": "Listar artículos publicados",
        "description": "Lista artículos educativos publicados en Inversión Consciente (finanzas, mercados, cripto, IA en español). Filtra opcionalmente por categoría y limita resultados.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {
            "category": {
              "description": "Valor de categoría en la base de datos. Omite para listar todas.",
              "type": "string",
              "enum": [
                "Destacado",
                "Economía",
                "IA",
                "Mercados",
                "Cripto"
              ]
            },
            "limit": {
              "description": "Cantidad máxima de artículos a devolver (por defecto 20, máximo 50).",
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        },
        "outputSchema": null
      },
      {
        "name": "get_article",
        "title": "Obtener artículo por slug",
        "description": "Devuelve el contenido completo (cuerpo en Markdown) de un artículo publicado de Inversión Consciente a partir de su slug de URL.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {
            "slug": {
              "type": "string",
              "minLength": 1,
              "description": "El slug del artículo, tal como aparece en /articulo/<slug>."
            }
          },
          "required": [
            "slug"
          ]
        },
        "outputSchema": null
      },
      {
        "name": "search_articles",
        "title": "Buscar artículos",
        "description": "Busca artículos publicados de Inversión Consciente cuyo titular o bajada contengan el texto indicado (búsqueda insensible a mayúsculas).",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "minLength": 2,
              "description": "Texto a buscar en titular (headline) y bajada (dek)."
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 30
            }
          },
          "required": [
            "query"
          ]
        },
        "outputSchema": null
      },
      {
        "name": "my_ai_usage",
        "title": "Mi uso de IA hoy",
        "description": "Devuelve el uso del chat IA del usuario autenticado hoy (mensajes enviados, límite diario, mensajes restantes y si es admin).",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": false,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {}
        },
        "outputSchema": null
      },
      {
        "name": "my_recent_messages",
        "title": "Mis mensajes recientes del chat",
        "description": "Devuelve los mensajes más recientes de la conversación del usuario autenticado con el asistente de IA de Inversión Consciente.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": false,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {
            "limit": {
              "description": "Máximo de mensajes a devolver (por defecto 20).",
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          }
        },
        "outputSchema": null
      },
      {
        "name": "create_article",
        "title": "Crear artículo (borrador)",
        "description": "Crea un artículo educativo nuevo en la base de conocimiento. Solo administradores. Siempre se guarda como borrador — publica luego con set_article_published. Acepta cuerpo en HTML (body_html) o Markdown (body_markdown, se convierte y sanitiza). No admite JSX.",
        "annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": false,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {
            "headline": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "description": "Titular del artículo."
            },
            "dek": {
              "type": "string",
              "minLength": 1,
              "maxLength": 400,
              "description": "Resumen corto (bajada) visible en las tarjetas."
            },
            "category": {
              "type": "string",
              "enum": [
                "Destacado",
                "Economía",
                "IA",
                "Mercados",
                "Cripto"
              ],
              "description": "Categoría de la base de datos."
            },
            "tone": {
              "type": "string",
              "enum": [
                "navy",
                "green",
                "gold",
                "amber",
                "red"
              ],
              "description": "Tono visual del chip: navy, green, gold, amber o red."
            },
            "body_html": {
              "description": "Cuerpo del artículo en HTML. Usa este O body_markdown.",
              "type": "string"
            },
            "body_markdown": {
              "description": "Cuerpo del artículo en Markdown (GFM). Se convierte a HTML y se sanitiza. Usa este O body_html.",
              "type": "string"
            },
            "slug": {
              "description": "Slug opcional. Si se omite, se genera a partir del titular.",
              "type": "string",
              "maxLength": 120
            },
            "read_time": {
              "description": "Tiempo de lectura mostrado (ej. \"6 min\").",
              "type": "string",
              "maxLength": 30
            }
          },
          "required": [
            "headline",
            "dek",
            "category",
            "tone"
          ]
        },
        "outputSchema": null
      },
      {
        "name": "update_article",
        "title": "Editar artículo",
        "description": "Edita un artículo existente por id o slug. Solo administradores. Al editar, el artículo vuelve a borrador automáticamente (igual que el panel). Cualquier campo omitido se deja sin cambio. Cuerpo opcional en HTML o Markdown.",
        "annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": false,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {
            "id": {
              "description": "ID del artículo. Envía id O slug.",
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "slug": {
              "description": "Slug actual del artículo. Envía id O slug.",
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "headline": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "dek": {
              "type": "string",
              "minLength": 1,
              "maxLength": 400
            },
            "category": {
              "type": "string",
              "enum": [
                "Destacado",
                "Economía",
                "IA",
                "Mercados",
                "Cripto"
              ]
            },
            "tone": {
              "type": "string",
              "enum": [
                "navy",
                "green",
                "gold",
                "amber",
                "red"
              ]
            },
            "body_html": {
              "description": "Nuevo cuerpo en HTML. Usa este O body_markdown.",
              "type": "string"
            },
            "body_markdown": {
              "description": "Nuevo cuerpo en Markdown. Se convierte y sanitiza.",
              "type": "string"
            },
            "new_slug": {
              "description": "Cambia el slug del artículo.",
              "type": "string",
              "maxLength": 120
            },
            "read_time": {
              "type": "string",
              "maxLength": 30
            }
          }
        },
        "outputSchema": null
      },
      {
        "name": "set_article_published",
        "title": "Publicar o despublicar artículo",
        "description": "Cambia el estado publicado/borrador de un artículo. Solo administradores. Envía id o slug, y published=true para hacerlo visible en el sitio o published=false para volverlo borrador.",
        "annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {
            "id": {
              "description": "ID del artículo. Envía id O slug.",
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "slug": {
              "description": "Slug del artículo. Envía id O slug.",
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "published": {
              "type": "boolean",
              "description": "true para publicar, false para volver a borrador."
            }
          },
          "required": [
            "published"
          ]
        },
        "outputSchema": null
      }
    ]
  }
}