{
  "name": "radardetrenes",
  "version": "4",
  "description": "Tools expuestas por la SPA al agente del navegador vía document.modelContext.registerTool().",
  "transport": "browser-only",
  "note": "These tools are registered in the page's JavaScript context and can only be invoked by an agent running inside the browser. An HTTP client cannot call them: use remoteAlternative instead.",
  "remoteAlternative": {
    "transport": "mcp-streamable-http",
    "endpoint": "https://radardetrenes.com/mcp",
    "method": "POST",
    "serverCard": "https://radardetrenes.com/.well-known/mcp/server-card.json",
    "note": "The same three tools, callable over JSON-RPC by any agent that is not running inside a browser."
  },
  "tools": [
    {
      "name": "buscar_tren",
      "title": "Buscar tren",
      "description": "Localiza un tren español en circulación por número y lo selecciona en el mapa en vivo.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "numero_tren": { "type": "string", "pattern": "^[A-Z]{0,4}\\s?\\d{2,5}$", "maxLength": 12 }
        },
        "required": ["numero_tren"],
        "additionalProperties": false
      },
      "annotations": { "readOnlyHint": false, "untrustedContentHint": true }
    },
    {
      "name": "ver_tablero",
      "title": "Ver tablero de estación",
      "description": "Abre el tablero de salidas y llegadas de una estación. Acepta nombre o código.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "estacion": { "type": "string", "pattern": "^[A-Za-z0-9ÁÉÍÓÚÜÑáéíóúüñ \\-\\.]{2,60}$", "maxLength": 60 }
        },
        "required": ["estacion"],
        "additionalProperties": false
      },
      "annotations": { "readOnlyHint": false, "untrustedContentHint": true }
    },
    {
      "name": "ver_flota_actual",
      "title": "Ver flota actual",
      "description": "Resumen del estado actual de la flota: total de trenes activos y cuántos llevan retraso significativo.",
      "inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
      "annotations": { "readOnlyHint": true, "untrustedContentHint": true }
    },
    {
      "name": "filtrar_trenes",
      "title": "Filtrar trenes",
      "description": "Aplica los filtros de tipo de tren y de puntualidad al mapa en vivo, e indica cuántos trenes quedan. Hay que pasar al menos uno de los dos.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "tipo": { "type": "string", "enum": ["todos", "larga_distancia", "cercanias"] },
          "retraso": { "type": "string", "enum": ["todos", "puntuales", "con_retraso"] }
        },
        "minProperties": 1,
        "additionalProperties": false
      },
      "annotations": { "readOnlyHint": false, "untrustedContentHint": true }
    },
    {
      "name": "ver_linea_cercanias",
      "title": "Ver línea de Cercanías",
      "description": "Deja en el mapa solo los trenes de una línea de Cercanías. Los códigos se repiten entre núcleos, así que admite la ciudad para desambiguar.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "linea": { "type": "string", "pattern": "^[A-Za-z0-9\\-]{1,8}$", "maxLength": 8 },
          "ciudad": { "type": "string", "pattern": "^[A-Za-z0-9ÁÉÍÓÚÜÑáéíóúüñ \\-\\./]{2,40}$", "maxLength": 40 }
        },
        "required": ["linea"],
        "additionalProperties": false
      },
      "annotations": { "readOnlyHint": false, "untrustedContentHint": true }
    },
    {
      "name": "centrar_mapa",
      "title": "Centrar el mapa",
      "description": "Mueve el mapa en vivo sobre una estación o una ciudad con estación.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "lugar": { "type": "string", "pattern": "^[A-Za-z0-9ÁÉÍÓÚÜÑáéíóúüñ \\-\\.]{2,60}$", "maxLength": 60 }
        },
        "required": ["lugar"],
        "additionalProperties": false
      },
      "annotations": { "readOnlyHint": false, "untrustedContentHint": true }
    },
    {
      "name": "limpiar_filtros",
      "title": "Limpiar filtros",
      "description": "Quita todos los filtros activos (tipo, retraso, producto, línea, serie y accesibilidad) y devuelve el mapa a la flota completa.",
      "inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
      "annotations": { "readOnlyHint": false, "untrustedContentHint": true }
    }
  ]
}
