{
  "notice": "bxzxxr MCP archive: a record of what public MCP servers declared when we listed them (we never call their tools). It is data, not a rating: nothing here says a server is safe, secure, verified or trustworthy, and a server can change after we looked. Secrets we detected are redacted; redacted tool lists are withheld and only their hash is shown.",
  "infrastructure": {
    "host": "spain-open-data-mcp-165703905656.europe-west1.run.app",
    "site": "spain-open-data-mcp-165703905656.europe-west1.run.app",
    "addresses": [
      {
        "address": "34.143.74.2",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": {
          "asn": 396982,
          "name": "GOOGLE-CLOUD-PLATFORM - Google LLC",
          "prefix": "34.143.74.0/24",
          "country": "US"
        }
      },
      {
        "address": "34.143.72.2",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": {
          "asn": 396982,
          "name": "GOOGLE-CLOUD-PLATFORM - Google LLC",
          "prefix": "34.143.72.0/24",
          "country": "US"
        }
      },
      {
        "address": "34.143.78.2",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": {
          "asn": 396982,
          "name": "GOOGLE-CLOUD-PLATFORM - Google LLC",
          "prefix": "34.143.78.0/24",
          "country": "US"
        }
      },
      {
        "address": "34.143.76.2",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": {
          "asn": 396982,
          "name": "GOOGLE-CLOUD-PLATFORM - Google LLC",
          "prefix": "34.143.76.0/24",
          "country": "US"
        }
      },
      {
        "address": "34.143.79.2",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": {
          "asn": 396982,
          "name": "GOOGLE-CLOUD-PLATFORM - Google LLC",
          "prefix": "34.143.79.0/24",
          "country": "US"
        }
      },
      {
        "address": "34.143.75.2",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": {
          "asn": 396982,
          "name": "GOOGLE-CLOUD-PLATFORM - Google LLC",
          "prefix": "34.143.75.0/24",
          "country": "US"
        }
      },
      {
        "address": "34.143.77.2",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": {
          "asn": 396982,
          "name": "GOOGLE-CLOUD-PLATFORM - Google LLC",
          "prefix": "34.143.77.0/24",
          "country": "US"
        }
      },
      {
        "address": "34.143.73.2",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": {
          "asn": 396982,
          "name": "GOOGLE-CLOUD-PLATFORM - Google LLC",
          "prefix": "34.143.73.0/24",
          "country": "US"
        }
      },
      {
        "address": "2600:1901:81d5:200::",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": null
      },
      {
        "address": "2600:1900:4245:200::",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": null
      },
      {
        "address": "2600:1900:4240:200::",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": null
      },
      {
        "address": "2600:1901:81d4:200::",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": null
      },
      {
        "address": "2600:1900:4243:200::",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": null
      },
      {
        "address": "2600:1900:4242:200::",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": null
      },
      {
        "address": "2600:1900:4241:200::",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": null
      },
      {
        "address": "2600:1900:4244:200::",
        "endpoints": 134,
        "shared_infrastructure": true,
        "network": null
      }
    ],
    "addresses_recorded": true,
    "address_history": [
      {
        "addresses": [
          "34.143.74.2",
          "34.143.72.2",
          "34.143.78.2",
          "34.143.76.2",
          "34.143.79.2",
          "34.143.75.2",
          "34.143.77.2",
          "34.143.73.2",
          "2600:1901:81d5:200::",
          "2600:1900:4245:200::",
          "2600:1900:4240:200::",
          "2600:1901:81d4:200::",
          "2600:1900:4243:200::",
          "2600:1900:4242:200::",
          "2600:1900:4241:200::",
          "2600:1900:4244:200::"
        ],
        "first_seen": "2026-11-23T19:41:01.509Z",
        "last_seen": "2026-11-23T19:41:01.509Z",
        "checks": 1
      },
      {
        "addresses": [
          "34.143.75.2",
          "34.143.76.2",
          "34.143.79.2",
          "34.143.77.2",
          "34.143.74.2",
          "34.143.72.2",
          "34.143.73.2",
          "34.143.78.2",
          "2600:1900:4245:200::",
          "2600:1901:81d5:200::",
          "2600:1900:4240:200::",
          "2600:1900:4241:200::",
          "2600:1900:4244:200::",
          "2600:1900:4242:200::",
          "2600:1901:81d4:200::",
          "2600:1900:4243:200::"
        ],
        "first_seen": "2026-11-22T19:40:03.188Z",
        "last_seen": "2026-11-22T19:40:03.188Z",
        "checks": 1
      },
      {
        "addresses": [
          "34.143.75.2",
          "34.143.74.2",
          "34.143.78.2",
          "34.143.73.2",
          "34.143.72.2",
          "34.143.76.2",
          "34.143.77.2",
          "34.143.79.2",
          "2600:1901:81d5:200::",
          "2600:1900:4244:200::",
          "2600:1901:81d4:200::",
          "2600:1900:4243:200::",
          "2600:1900:4245:200::",
          "2600:1900:4240:200::",
          "2600:1900:4241:200::",
          "2600:1900:4242:200::"
        ],
        "first_seen": "2026-11-21T15:20:02.227Z",
        "last_seen": "2026-11-21T15:20:02.227Z",
        "checks": 1
      }
    ],
    "hosting": [
      {
        "value": "Google Cloud Run",
        "evidence": "host name ends in .run.app"
      }
    ],
    "software": [],
    "server_info": {
      "name": "spain-open-data",
      "version": "0.1.4",
      "protocol_version": "2025-06-18"
    },
    "headers": {
      "server": "Google Frontend"
    },
    "auth": null
  },
  "related": {
    "same_address": {
      "total": 133,
      "sample": [
        {
          "id": "350",
          "url": "https://mcp-server-295985738387.europe-west1.run.app/mcp",
          "server_name": "ai.bankee/inferventis-mcp",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T04:39:01.353Z"
        },
        {
          "id": "3970",
          "url": "https://agent-market-826727841930.us-central1.run.app/mcp",
          "server_name": "app.run.us-central1.agent-market-826727841930/agent-market",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T07:12:03.032Z"
        },
        {
          "id": "4018",
          "url": "https://sentn-opportunity-mcp-773063283118.us-central1.run.app/mcp",
          "server_name": "app.sentn/opportunity-intelligence",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T07:13:03.426Z"
        },
        {
          "id": "4593",
          "url": "https://mcp-myl-oov7xgbxua-ts.a.run.app/mcp",
          "server_name": "au.com.manageyourloans/mortgage-tools",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T07:20:12.360Z"
        },
        {
          "id": "7298",
          "url": "https://bids44-mcp-751110103074.asia-south1.run.app/mcp",
          "server_name": "com.bids44/marketplace",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T08:10:11.535Z"
        },
        {
          "id": "7737",
          "url": "https://canarics-radio-647994203646.europe-central2.run.app/mcp",
          "server_name": "com.canarics/radio",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T08:19:03.275Z"
        },
        {
          "id": "9354",
          "url": "https://et-mcp-ks4n6ix7wa-du.a.run.app/mcp",
          "server_name": "com.emergetimes/news",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T14:23:03.837Z"
        },
        {
          "id": "11470",
          "url": "https://jagannatha-hora-359167915530.europe-west1.run.app/mcp",
          "server_name": "com.jagannathahora/vedic-astrology",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T15:08:11.333Z"
        },
        {
          "id": "13782",
          "url": "https://orbitstudio-api-597899603925.europe-west1.run.app/mcp?via=mcp",
          "server_name": "com.orbitstudio3d/orbitstudio",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T15:49:05.175Z"
        },
        {
          "id": "16123",
          "url": "https://mcpconnector-gtlizqtvza-uw.a.run.app/public",
          "server_name": "com.sonarconnections/sonar-connections",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T16:31:03.998Z"
        },
        {
          "id": "20606",
          "url": "https://runboth-agent-mgbxvs4loq-uc.a.run.app/mcp",
          "server_name": "dev.runboth/agent",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T17:36:02.451Z"
        },
        {
          "id": "21602",
          "url": "https://agent-gateway-i3gust564q-ey.a.run.app/mcp/de-grid-oracle",
          "server_name": "eu.iotpay/de-grid-oracle",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T17:47:04.930Z"
        },
        {
          "id": "21603",
          "url": "https://agent-gateway-i3gust564q-ey.a.run.app/mcp",
          "server_name": "eu.iotpay/en16931-validator",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T17:48:01.721Z"
        },
        {
          "id": "21604",
          "url": "https://agent-gateway-i3gust564q-ey.a.run.app/mcp/privacy-pii-shield",
          "server_name": "eu.iotpay/privacy-pii-shield",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T17:49:00.894Z"
        },
        {
          "id": "21605",
          "url": "https://agent-gateway-i3gust564q-ey.a.run.app/mcp/sanctions-kyb",
          "server_name": "eu.iotpay/sanctions-kyb",
          "last_state": "listed",
          "last_checked_at": "2026-11-24T17:50:08.606Z"
        },
        {
          "id": "23226",
          "url": "https://genesis-astro-guide-r2owtywexa-an.a.run.app/mcp",
          "server_name": "io.github.AETHER-CORE1219/genesis-astro",
          "last_state": "listed",
          "last_checked_at": "2026-11-23T18:19:03.882Z"
        },
        {
          "id": "23598",
          "url": "https://autopoiesis-mcp-267405155162.us-west1.run.app/mcp",
          "server_name": "io.github.Autopoiesis-ai/mcp",
          "last_state": "listed",
          "last_checked_at": "2026-11-23T18:24:02.399Z"
        },
        {
          "id": "24702",
          "url": "https://fabric-api-393345198409.us-west1.run.app/mcp",
          "server_name": "io.github.Fabric-Protocol/fabric",
          "last_state": "listed",
          "last_checked_at": "2026-11-23T18:33:05.251Z"
        },
        {
          "id": "25198",
          "url": "https://stockbloc.ai.studio/api/mcp/rpc",
          "server_name": "io.github.Jaywestphilly/stock-bloc",
          "last_state": "listed",
          "last_checked_at": "2026-11-23T18:40:02.002Z"
        },
        {
          "id": "25285",
          "url": "https://fmcsa-mcp-843680657471.us-central1.run.app/mcp",
          "server_name": "io.github.KMCTO/fmcsa-carrier-intelligence",
          "last_state": "listed",
          "last_checked_at": "2026-11-23T18:41:01.619Z"
        }
      ]
    },
    "same_site": {
      "total": 0,
      "sample": []
    },
    "same_tool_list": {
      "total": 0,
      "sample": []
    },
    "same_publisher": {
      "publisher": "io.github.digvijaysingh-ai",
      "total": 0,
      "sample": []
    },
    "same_repository": {
      "repository_url": "https://github.com/digvijaysingh-ai/spain-open-data-mcp",
      "total": 0,
      "sample": []
    },
    "note": "Shared addresses on big platforms (Cloudflare, Vercel and the like) put unrelated servers together; those are marked shared_infrastructure. A match is a pivot, not a link between operators."
  },
  "endpoint": {
    "id": "28975",
    "server_name": "io.github.digvijaysingh-ai/spain-open-data-mcp",
    "url": "https://spain-open-data-mcp-165703905656.europe-west1.run.app/mcp",
    "host": "spain-open-data-mcp-165703905656.europe-west1.run.app",
    "transport": "streamable-http",
    "last_checked_at": "2026-11-23T19:41:01.509Z",
    "last_state": "listed",
    "last_detail": null,
    "consecutive_failures": 0,
    "current_sha": "a0faf2da198f5238d2b2f731f740d9709c8d3ddbf0c48e65fb35a49eec0b1340",
    "first_listed_at": "2026-11-21T15:20:02.227Z",
    "created_at": "2026-11-21T09:35:17.901Z",
    "resolved_addresses": [
      "34.143.74.2",
      "34.143.72.2",
      "34.143.78.2",
      "34.143.76.2",
      "34.143.79.2",
      "34.143.75.2",
      "34.143.77.2",
      "34.143.73.2",
      "2600:1901:81d5:200::",
      "2600:1900:4245:200::",
      "2600:1900:4240:200::",
      "2600:1901:81d4:200::",
      "2600:1900:4243:200::",
      "2600:1900:4242:200::",
      "2600:1900:4241:200::",
      "2600:1900:4244:200::"
    ]
  },
  "server": {
    "name": "io.github.digvijaysingh-ai/spain-open-data-mcp",
    "title": "Spain Open Data",
    "description": "Market sizing, prices, rents, crime and locations in Spain from INE and other public data",
    "version": "0.1.4",
    "registry_status": "active",
    "repository_url": "https://github.com/digvijaysingh-ai/spain-open-data-mcp",
    "website_url": "https://digvijaysingh-ai.github.io/spain-open-data-mcp/",
    "published_at": "2026-10-17T17:28:04.099Z",
    "updated_at": "2026-10-17T17:28:04.099Z",
    "first_seen": "2026-11-21T09:35:17.361Z"
  },
  "other_endpoints": [],
  "intel": {
    "capabilities": [],
    "evm_addresses": [],
    "chains": [],
    "tokens": [],
    "computed_at": "2026-11-22T15:45:12.713Z"
  },
  "operator": {
    "key": "run.app",
    "name": "run.app",
    "platform": false,
    "marketplace": true
  },
  "needs_sign_in": false,
  "reachability": {
    "window_days": 30,
    "checks": 3,
    "answered": 3,
    "answered_percent": 100,
    "avg_listing_latency_ms": 772,
    "first_check_in_window": "2026-11-21T15:20:02.227Z",
    "consecutive_failures_now": 0,
    "days": [
      {
        "day": "2026-11-21",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-22",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      },
      {
        "day": "2026-11-23",
        "checks": 1,
        "answered": 1,
        "last_state": "listed"
      }
    ]
  },
  "tool_list": {
    "sha256": "a0faf2da198f5238d2b2f731f740d9709c8d3ddbf0c48e65fb35a49eec0b1340",
    "tools": 13,
    "resources": 2,
    "prompts": 3,
    "first_seen": "2026-11-21T15:20:02.997Z",
    "tool_names": [
      "resolve_place",
      "demographics",
      "income",
      "businesses",
      "market_size",
      "compare_areas",
      "catchment",
      "price_band",
      "chart",
      "rents",
      "crime",
      "find_datasets",
      "read_dataset"
    ],
    "declared": {
      "tools": [
        {
          "name": "resolve_place",
          "title": "Resolve a Spanish place",
          "description": "Find the INE code and level (CCAA, province, municipality, district, tract) for a place in Spain.\n\n    Use this first when a question names a place. Returns the best match first, with\n    alternatives (e.g. 'Valencia' is both a city and a province). Handles accents, Basque,\n    Catalan and Galician names, and common English names (Seville, Catalonia).\n    Districts and tracts are shown with the OpenStreetMap neighbourhood names inside them\n    ('Valladolid distrito 10 (Parquesol, Girón, La Victoria)'), and a neighbourhood name\n    ('Parquesol, Valladolid', 'Gràcia, Barcelona') returns the INE district that contains it.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "resolve_placeArguments",
            "required": [
              "query"
            ],
            "properties": {
              "query": {
                "type": "string",
                "title": "Query",
                "description": "Place name or INE code, e.g. 'A Coruña', 'Mérida, Badajoz', '08'."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Place": {
                "type": "object",
                "title": "Place",
                "required": [
                  "code",
                  "level",
                  "name"
                ],
                "properties": {
                  "ccaa": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa",
                    "default": null
                  },
                  "code": {
                    "type": "string",
                    "title": "Code",
                    "description": "INE code. Pass this to other tools."
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "enum": [
                      "ccaa",
                      "province",
                      "municipality",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Level"
                  },
                  "match": {
                    "enum": [
                      "code",
                      "exact",
                      "prefix",
                      "fuzzy",
                      "neighbourhood"
                    ],
                    "type": "string",
                    "title": "Match",
                    "default": "exact",
                    "description": "How the query matched. 'fuzzy' means a spelling guess: confirm it. 'neighbourhood' means a neighbourhood name was found inside this INE district."
                  },
                  "province": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province",
                    "default": null
                  },
                  "ccaa_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa Code",
                    "default": null
                  },
                  "area_names": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Area Names",
                    "default": null,
                    "description": "For districts and tracts: OpenStreetMap neighbourhood names inside it (not official INE names)."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null,
                    "description": "Official population (Padrón), when known."
                  },
                  "match_score": {
                    "type": "number",
                    "title": "Match Score",
                    "default": 1,
                    "description": "Name similarity, 0-1."
                  },
                  "matched_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Matched Name",
                    "default": null,
                    "description": "The neighbourhood name that matched, if any."
                  },
                  "municipality": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality",
                    "default": null
                  },
                  "official_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Official Name",
                    "default": null,
                    "description": "INE's form of the name when it differs ('Palmas de Gran Canaria, Las')."
                  },
                  "province_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province Code",
                    "default": null
                  },
                  "population_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Date",
                    "default": null
                  },
                  "municipality_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality Code",
                    "default": null
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              }
            },
            "title": "Envelope[list[Place]]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Place"
                },
                "title": "Data"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "demographics",
          "title": "Population and households",
          "description": "Population, sex, five-year age bands, 5-year trend, and household profile for a place in Spain.\n\n    Municipality, province and CCAA: census population by age band (latest 1 January),\n    cross-checked against the official Padrón figure. District and tract: census age bands\n    and sex from INE's file by census tract. Municipality, district and tract:\n    household size, single-person households, mean age, share under 18 and 65+ from INE's\n    income atlas. Use sub_areas to compare a city's districts or tracts, e.g. to find\n    where young families or older residents concentrate.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "demographicsArguments",
            "required": [
              "place"
            ],
            "properties": {
              "place": {
                "type": "string",
                "title": "Place",
                "description": "Place name or INE code: municipality ('Valladolid' or '47186'), province ('41'; a bare name like 'Sevilla' means the city), autonomous community ('Cataluña' or 'CA09'), district ('4718603') or census tract ('4718603012'). 'Name, Province' picks between same-named towns."
              },
              "sub_areas": {
                "enum": [
                  "none",
                  "district",
                  "tract"
                ],
                "type": "string",
                "title": "Sub Areas",
                "default": "none",
                "description": "For a municipality, also list its 'district's or census 'tract's. Default 'none'."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Place": {
                "type": "object",
                "title": "Place",
                "required": [
                  "code",
                  "level",
                  "name"
                ],
                "properties": {
                  "ccaa": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa",
                    "default": null
                  },
                  "code": {
                    "type": "string",
                    "title": "Code",
                    "description": "INE code. Pass this to other tools."
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "enum": [
                      "ccaa",
                      "province",
                      "municipality",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Level"
                  },
                  "match": {
                    "enum": [
                      "code",
                      "exact",
                      "prefix",
                      "fuzzy",
                      "neighbourhood"
                    ],
                    "type": "string",
                    "title": "Match",
                    "default": "exact",
                    "description": "How the query matched. 'fuzzy' means a spelling guess: confirm it. 'neighbourhood' means a neighbourhood name was found inside this INE district."
                  },
                  "province": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province",
                    "default": null
                  },
                  "ccaa_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa Code",
                    "default": null
                  },
                  "area_names": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Area Names",
                    "default": null,
                    "description": "For districts and tracts: OpenStreetMap neighbourhood names inside it (not official INE names)."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null,
                    "description": "Official population (Padrón), when known."
                  },
                  "match_score": {
                    "type": "number",
                    "title": "Match Score",
                    "default": 1,
                    "description": "Name similarity, 0-1."
                  },
                  "matched_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Matched Name",
                    "default": null,
                    "description": "The neighbourhood name that matched, if any."
                  },
                  "municipality": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality",
                    "default": null
                  },
                  "official_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Official Name",
                    "default": null,
                    "description": "INE's form of the name when it differs ('Palmas de Gran Canaria, Las')."
                  },
                  "province_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province Code",
                    "default": null
                  },
                  "population_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Date",
                    "default": null
                  },
                  "municipality_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality Code",
                    "default": null
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "AgeBand": {
                "type": "object",
                "title": "AgeBand",
                "required": [
                  "band",
                  "min_age",
                  "max_age",
                  "population",
                  "share_pct"
                ],
                "properties": {
                  "band": {
                    "type": "string",
                    "title": "Band",
                    "description": "e.g. '0-4', '100+'"
                  },
                  "max_age": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Max Age"
                  },
                  "min_age": {
                    "type": "integer",
                    "title": "Min Age"
                  },
                  "share_pct": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Share Pct"
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population"
                  }
                }
              },
              "SubArea": {
                "type": "object",
                "title": "SubArea",
                "required": [
                  "code",
                  "name",
                  "level",
                  "profile"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "profile": {
                    "$ref": "#/$defs/HouseholdProfile"
                  }
                }
              },
              "YearValue": {
                "type": "object",
                "title": "YearValue",
                "required": [
                  "year",
                  "value"
                ],
                "properties": {
                  "year": {
                    "type": "integer",
                    "title": "Year"
                  },
                  "value": {
                    "type": "number",
                    "title": "Value"
                  }
                }
              },
              "AreaDemographics": {
                "type": "object",
                "title": "AreaDemographics",
                "required": [
                  "place"
                ],
                "properties": {
                  "male": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Male",
                    "default": null
                  },
                  "place": {
                    "$ref": "#/$defs/Place"
                  },
                  "female": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Female",
                    "default": null
                  },
                  "age_bands": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/AgeBand"
                    },
                    "title": "Age Bands"
                  },
                  "growth_pct": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Growth Pct",
                    "default": null,
                    "description": "Population change over `population_trend`, in %."
                  },
                  "households": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/HouseholdProfile"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null,
                    "description": "Census population on 1 January of `population_year`."
                  },
                  "pct_age_0_4": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Age 0 4",
                    "default": null
                  },
                  "pct_age_0_14": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Age 0 14",
                    "default": null
                  },
                  "pct_age_15_64": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Age 15 64",
                    "default": null
                  },
                  "pct_age_65_plus": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Age 65 Plus",
                    "default": null
                  },
                  "population_year": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Year",
                    "default": null
                  },
                  "population_trend": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/YearValue"
                    },
                    "title": "Population Trend"
                  },
                  "official_population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Official Population",
                    "default": null,
                    "description": "Official Padrón figure for municipalities (the legal population)."
                  }
                }
              },
              "DemographicsData": {
                "type": "object",
                "title": "DemographicsData",
                "required": [
                  "area"
                ],
                "properties": {
                  "area": {
                    "$ref": "#/$defs/AreaDemographics"
                  },
                  "sub_areas": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/SubArea"
                    },
                    "title": "Sub Areas"
                  },
                  "sub_area_level": {
                    "enum": [
                      "none",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Sub Area Level",
                    "default": "none"
                  },
                  "sub_areas_total": {
                    "type": "integer",
                    "title": "Sub Areas Total",
                    "default": 0
                  }
                }
              },
              "HouseholdProfile": {
                "type": "object",
                "title": "HouseholdProfile",
                "properties": {
                  "year": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Year",
                    "default": null
                  },
                  "mean_age": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Mean Age",
                    "default": null
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null
                  },
                  "pct_65_plus": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct 65 Plus",
                    "default": null
                  },
                  "pct_under_18": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Under 18",
                    "default": null
                  },
                  "avg_household_size": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Avg Household Size",
                    "default": null
                  },
                  "estimated_households": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Estimated Households",
                    "default": null,
                    "description": "population / average household size. An estimate."
                  },
                  "pct_spanish_nationality": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Spanish Nationality",
                    "default": null
                  },
                  "pct_single_person_households": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Single Person Households",
                    "default": null
                  }
                },
                "description": "From the income atlas (ADRH); available down to census tract."
              }
            },
            "title": "Envelope[DemographicsData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/DemographicsData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "income",
          "title": "Household income",
          "description": "Household income for a place in Spain from INE's income atlas, down to census tract.\n\n    Returns net and gross income per person and per household, mean and median per\n    consumption unit, inequality (Gini, P80/P20), income sources (wages, pensions,\n    benefits), a trend, and benchmarks against the province, region and Spain. Use it\n    for purchasing power, price positioning and choosing between districts. Figures are\n    euros of the data year; the atlas runs about two years behind.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "incomeArguments",
            "required": [
              "place"
            ],
            "properties": {
              "place": {
                "type": "string",
                "title": "Place",
                "description": "Place name or INE code: municipality ('Valladolid' or '47186'), province ('41'; a bare name like 'Sevilla' means the city), autonomous community ('Cataluña' or 'CA09'), district ('4718603') or census tract ('4718603012'). 'Name, Province' picks between same-named towns."
              },
              "years": {
                "type": "integer",
                "title": "Years",
                "default": 5,
                "maximum": 9,
                "minimum": 1,
                "description": "Years of history for the trend (max 9)."
              },
              "rank_by": {
                "enum": [
                  "net_income_per_person",
                  "net_income_per_household",
                  "median_income_per_consumption_unit"
                ],
                "type": "string",
                "title": "Rank By",
                "default": "net_income_per_person",
                "description": "Metric used to rank sub-areas."
              },
              "sub_areas": {
                "enum": [
                  "none",
                  "district",
                  "tract"
                ],
                "type": "string",
                "title": "Sub Areas",
                "default": "none",
                "description": "For a municipality, rank its 'district's or census 'tract's. Default 'none'."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Place": {
                "type": "object",
                "title": "Place",
                "required": [
                  "code",
                  "level",
                  "name"
                ],
                "properties": {
                  "ccaa": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa",
                    "default": null
                  },
                  "code": {
                    "type": "string",
                    "title": "Code",
                    "description": "INE code. Pass this to other tools."
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "enum": [
                      "ccaa",
                      "province",
                      "municipality",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Level"
                  },
                  "match": {
                    "enum": [
                      "code",
                      "exact",
                      "prefix",
                      "fuzzy",
                      "neighbourhood"
                    ],
                    "type": "string",
                    "title": "Match",
                    "default": "exact",
                    "description": "How the query matched. 'fuzzy' means a spelling guess: confirm it. 'neighbourhood' means a neighbourhood name was found inside this INE district."
                  },
                  "province": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province",
                    "default": null
                  },
                  "ccaa_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa Code",
                    "default": null
                  },
                  "area_names": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Area Names",
                    "default": null,
                    "description": "For districts and tracts: OpenStreetMap neighbourhood names inside it (not official INE names)."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null,
                    "description": "Official population (Padrón), when known."
                  },
                  "match_score": {
                    "type": "number",
                    "title": "Match Score",
                    "default": 1,
                    "description": "Name similarity, 0-1."
                  },
                  "matched_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Matched Name",
                    "default": null,
                    "description": "The neighbourhood name that matched, if any."
                  },
                  "municipality": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality",
                    "default": null
                  },
                  "official_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Official Name",
                    "default": null,
                    "description": "INE's form of the name when it differs ('Palmas de Gran Canaria, Las')."
                  },
                  "province_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province Code",
                    "default": null
                  },
                  "population_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Date",
                    "default": null
                  },
                  "municipality_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality Code",
                    "default": null
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "AreaIncome": {
                "type": "object",
                "title": "AreaIncome",
                "required": [
                  "code",
                  "name",
                  "level",
                  "figures"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "figures": {
                    "$ref": "#/$defs/IncomeFigures"
                  }
                }
              },
              "IncomeData": {
                "type": "object",
                "title": "IncomeData",
                "required": [
                  "place",
                  "figures"
                ],
                "properties": {
                  "place": {
                    "$ref": "#/$defs/Place"
                  },
                  "trend": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/TrendPoint"
                    },
                    "title": "Trend"
                  },
                  "figures": {
                    "$ref": "#/$defs/IncomeFigures"
                  },
                  "sub_areas": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/AreaIncome"
                    },
                    "title": "Sub Areas"
                  },
                  "benchmarks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/AreaIncome"
                    },
                    "title": "Benchmarks",
                    "description": "Province, CCAA and Spain."
                  },
                  "sub_area_level": {
                    "enum": [
                      "none",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Sub Area Level",
                    "default": "none"
                  },
                  "sub_areas_total": {
                    "type": "integer",
                    "title": "Sub Areas Total",
                    "default": 0
                  },
                  "sub_area_summary": {
                    "anyOf": [
                      {
                        "type": "object",
                        "additionalProperties": {
                          "type": "number"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Sub Area Summary",
                    "default": null,
                    "description": "min / p25 / median / p75 / max of the ranking metric across all sub-areas."
                  },
                  "growth_pct_per_person": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Growth Pct Per Person",
                    "default": null,
                    "description": "Change in net income per person over the trend."
                  }
                }
              },
              "TrendPoint": {
                "type": "object",
                "title": "TrendPoint",
                "required": [
                  "year",
                  "net_income_per_person",
                  "net_income_per_household"
                ],
                "properties": {
                  "year": {
                    "type": "integer",
                    "title": "Year"
                  },
                  "net_income_per_person": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Net Income Per Person"
                  },
                  "net_income_per_household": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Net Income Per Household"
                  }
                }
              },
              "IncomeFigures": {
                "type": "object",
                "title": "IncomeFigures",
                "properties": {
                  "gini": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Gini",
                    "default": null,
                    "description": "Gini index, 0-100."
                  },
                  "year": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Year",
                    "default": null
                  },
                  "p80_p20": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "P80 P20",
                    "default": null,
                    "description": "Income of the 80th percentile / 20th percentile."
                  },
                  "suppressed": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Suppressed",
                    "description": "Indicators INE withheld for this unit."
                  },
                  "pct_income_other": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Income Other",
                    "default": null
                  },
                  "pct_income_wages": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Income Wages",
                    "default": null
                  },
                  "pct_income_pensions": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Income Pensions",
                    "default": null
                  },
                  "net_income_per_person": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Net Income Per Person",
                    "default": null
                  },
                  "gross_income_per_person": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Gross Income Per Person",
                    "default": null
                  },
                  "net_income_per_household": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Net Income Per Household",
                    "default": null
                  },
                  "pct_income_other_benefits": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Income Other Benefits",
                    "default": null
                  },
                  "gross_income_per_household": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Gross Income Per Household",
                    "default": null
                  },
                  "mean_income_per_consumption_unit": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Mean Income Per Consumption Unit",
                    "default": null
                  },
                  "pct_income_unemployment_benefits": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Income Unemployment Benefits",
                    "default": null
                  },
                  "median_income_per_consumption_unit": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Median Income Per Consumption Unit",
                    "default": null
                  }
                },
                "description": "Euros per year, in money of the data year (not inflation-adjusted)."
              }
            },
            "title": "Envelope[IncomeData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/IncomeData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "businesses",
          "title": "Businesses and competitors",
          "description": "Count businesses of a kind in a place in Spain, per 10,000 residents and per km², from OpenStreetMap.\n\n    Use it to size competition and supply: how many gyms, cafés or dentists an area has,\n    how that compares with the province, region and Spain, which brands dominate, and\n    which districts or tracts are over- or under-served (rank sub-areas by\n    per_10k_residents). Counts are lower bounds because OpenStreetMap is mapped by\n    volunteers; where INE's company directory covers the same activity, the result says\n    how complete the map looks in that region. Returns counts and brands only, never\n    lists of individual premises.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "businessesArguments",
            "required": [
              "place"
            ],
            "properties": {
              "place": {
                "type": "string",
                "title": "Place",
                "description": "Place name or INE code: municipality ('Valladolid' or '47186'), province ('41'; a bare name like 'Sevilla' means the city), autonomous community ('Cataluña' or 'CA09'), district ('4718603') or census tract ('4718603012'). 'Name, Province' picks between same-named towns."
              },
              "rank_by": {
                "enum": [
                  "count",
                  "per_10k_residents",
                  "per_km2"
                ],
                "type": "string",
                "title": "Rank By",
                "default": "count",
                "description": "How to rank sub-areas: 'count', 'per_10k_residents' or 'per_km2'."
              },
              "category": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Category",
                "default": null,
                "description": "What to count. A category: restaurant, fast_food, cafe, bar, ice_cream, nightclub, supermarket, convenience, bakery, butcher, greengrocer, drinks_tobacco, clothes, pharmacy, optician, beauty_shop, jewellery, florist, pet_shop, electronics, home, books_leisure, variety_store, hairdresser, beauty_salon, laundry, dentist, doctor, physiotherapy, hospital, veterinary, gym, sports_centre, dance_studio, cinema_theatre, private_school, childcare, school, hotel, guest_house, camp_site, estate_agent, lawyer, accountant, insurance, travel_agency, coworking, bank, fuel, car_repair, car_dealer, car_wash. Plain words work too ('gyms', 'peluquerías'). Or a sector: food_drink, food_retail, retail, personal_services, health, leisure, education, accommodation, professional, finance, motoring. Or OpenStreetMap tags: 'shop=bakery' or 'amenity=bar,amenity=pub'. Leave empty for all businesses, broken down by category."
              },
              "sub_areas": {
                "enum": [
                  "none",
                  "district",
                  "tract"
                ],
                "type": "string",
                "title": "Sub Areas",
                "default": "none",
                "description": "For a municipality, also count by 'district' or census 'tract'. Default 'none'."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "Coverage": {
                "type": "object",
                "title": "Coverage",
                "required": [
                  "region_code",
                  "region_name",
                  "osm_categories",
                  "osm_count",
                  "cnae",
                  "cnae_label",
                  "dirce_companies",
                  "dirce_date",
                  "ratio"
                ],
                "properties": {
                  "cnae": {
                    "type": "string",
                    "title": "Cnae"
                  },
                  "ratio": {
                    "type": "number",
                    "title": "Ratio",
                    "description": "OSM places per DIRCE company. Near or above 1 suggests good coverage."
                  },
                  "osm_count": {
                    "type": "integer",
                    "title": "Osm Count"
                  },
                  "cnae_label": {
                    "type": "string",
                    "title": "Cnae Label"
                  },
                  "dirce_date": {
                    "type": "string",
                    "title": "Dirce Date"
                  },
                  "region_code": {
                    "type": "string",
                    "title": "Region Code"
                  },
                  "region_name": {
                    "type": "string",
                    "title": "Region Name"
                  },
                  "osm_categories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Osm Categories"
                  },
                  "dirce_companies": {
                    "type": "integer",
                    "title": "Dirce Companies"
                  }
                },
                "description": "OSM places vs DIRCE companies for the same activity in the place's region."
              },
              "AreaCount": {
                "type": "object",
                "title": "AreaCount",
                "required": [
                  "code",
                  "name",
                  "level",
                  "count"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "count": {
                    "type": "integer",
                    "title": "Count"
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "per_km2": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Per Km2",
                    "default": null
                  },
                  "area_km2": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Area Km2",
                    "default": null
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null
                  },
                  "population_year": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Year",
                    "default": null
                  },
                  "per_10k_residents": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Per 10K Residents",
                    "default": null
                  }
                }
              },
              "BrandCount": {
                "type": "object",
                "title": "BrandCount",
                "required": [
                  "brand",
                  "count",
                  "share_pct"
                ],
                "properties": {
                  "brand": {
                    "type": "string",
                    "title": "Brand"
                  },
                  "count": {
                    "type": "integer",
                    "title": "Count"
                  },
                  "share_pct": {
                    "type": "number",
                    "title": "Share Pct"
                  }
                }
              },
              "CategoryCount": {
                "type": "object",
                "title": "CategoryCount",
                "required": [
                  "category",
                  "label",
                  "count"
                ],
                "properties": {
                  "count": {
                    "type": "integer",
                    "title": "Count"
                  },
                  "label": {
                    "type": "string",
                    "title": "Label"
                  },
                  "category": {
                    "type": "string",
                    "title": "Category"
                  },
                  "per_10k_residents": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Per 10K Residents",
                    "default": null
                  }
                }
              },
              "PeerBenchmark": {
                "type": "object",
                "title": "PeerBenchmark",
                "required": [
                  "municipalities",
                  "population_from",
                  "population_to",
                  "median_per_10k_residents",
                  "rank_pct"
                ],
                "properties": {
                  "rank_pct": {
                    "type": "number",
                    "title": "Rank Pct",
                    "description": "Share of peers with a lower rate than this place, 0-100."
                  },
                  "population_to": {
                    "type": "integer",
                    "title": "Population To"
                  },
                  "municipalities": {
                    "type": "integer",
                    "title": "Municipalities"
                  },
                  "population_from": {
                    "type": "integer",
                    "title": "Population From"
                  },
                  "median_per_10k_residents": {
                    "type": "number",
                    "title": "Median Per 10K Residents"
                  }
                },
                "description": "Municipalities of similar size anywhere in Spain."
              },
              "BusinessesData": {
                "type": "object",
                "title": "BusinessesData",
                "required": [
                  "query",
                  "osm_date",
                  "area"
                ],
                "properties": {
                  "area": {
                    "$ref": "#/$defs/AreaCount"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Tags"
                  },
                  "peers": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/PeerBenchmark"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "query": {
                    "type": "string",
                    "title": "Query",
                    "description": "What was counted: a category, a sector, OSM tags, or all businesses."
                  },
                  "coverage": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Coverage"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "osm_date": {
                    "type": "string",
                    "title": "Osm Date"
                  },
                  "sub_areas": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/AreaCount"
                    },
                    "title": "Sub Areas"
                  },
                  "benchmarks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/AreaCount"
                    },
                    "title": "Benchmarks"
                  },
                  "categories": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Categories"
                  },
                  "top_brands": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/BrandCount"
                    },
                    "title": "Top Brands"
                  },
                  "by_category": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/CategoryCount"
                    },
                    "title": "By Category"
                  },
                  "sub_area_level": {
                    "enum": [
                      "none",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Sub Area Level",
                    "default": "none"
                  },
                  "sub_areas_total": {
                    "type": "integer",
                    "title": "Sub Areas Total",
                    "default": 0
                  },
                  "sub_area_rank_by": {
                    "enum": [
                      "count",
                      "per_10k_residents",
                      "per_km2"
                    ],
                    "type": "string",
                    "title": "Sub Area Rank By",
                    "default": "count"
                  },
                  "branded_share_pct": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Branded Share Pct",
                    "default": null,
                    "description": "Share of places tagged with a brand."
                  }
                }
              }
            },
            "title": "Envelope[BusinessesData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/BusinessesData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "market_size",
          "title": "Market size in euros",
          "description": "Size the yearly market for a business category in a place in Spain, in euros, with a range.\n\n    Market = households × INE household spending on the category × an income adjustment.\n    Supply = competing businesses, calibrated against INE's company directory. Returns market\n    per business and an opportunity score: market per business against the region (1.0 = same as\n    the region), not a forecast of openings. Every assumption is listed. Assumptions can be overridden to test scenarios. Use for \"how big\n    is the market for X in Y\" and \"is Y under-served for X\".\n    ",
          "inputSchema": {
            "type": "object",
            "title": "market_sizeArguments",
            "required": [
              "place",
              "category"
            ],
            "properties": {
              "place": {
                "type": "string",
                "title": "Place",
                "description": "Place name or INE code: municipality ('Valladolid' or '47186'), province ('41'; a bare name like 'Sevilla' means the city), autonomous community ('Cataluña' or 'CA09'), district ('4718603') or census tract ('4718603012'). 'Name, Province' picks between same-named towns."
              },
              "category": {
                "type": "string",
                "title": "Category",
                "description": "Business category: restaurant, cafe, bar, fast_food, bakery, butcher, greengrocer, supermarket, pharmacy, optician, dentist, physiotherapy, hairdresser, beauty_salon, veterinary, gym, childcare, private_school, clothes, home. Plain words work too ('gyms', 'peluquerías')."
              },
              "competitors": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Competitors",
                "default": null,
                "description": "Override the estimated number of competing businesses."
              },
              "capture_share": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Capture Share",
                "default": null,
                "description": "Share of the market one business could win (0-1), to estimate obtainable revenue."
              },
              "spend_per_household": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Spend Per Household",
                "default": null,
                "description": "Override INE's yearly spend per household on the category, in euros."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Range": {
                "type": "object",
                "title": "Range",
                "required": [
                  "low",
                  "base",
                  "high"
                ],
                "properties": {
                  "low": {
                    "type": "number",
                    "title": "Low"
                  },
                  "base": {
                    "type": "number",
                    "title": "Base"
                  },
                  "high": {
                    "type": "number",
                    "title": "High"
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "Assumption": {
                "type": "object",
                "title": "Assumption",
                "required": [
                  "name",
                  "value",
                  "source"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "value": {
                    "type": "string",
                    "title": "Value"
                  },
                  "source": {
                    "type": "string",
                    "title": "Source"
                  },
                  "user_set": {
                    "type": "boolean",
                    "title": "User Set",
                    "default": false
                  }
                }
              },
              "MarketData": {
                "type": "object",
                "title": "MarketData",
                "required": [
                  "method_version",
                  "category",
                  "label",
                  "region",
                  "area",
                  "spend_per_household",
                  "income_ratio",
                  "family_share",
                  "assumptions"
                ],
                "properties": {
                  "area": {
                    "$ref": "#/$defs/AreaOpportunity"
                  },
                  "label": {
                    "type": "string",
                    "title": "Label"
                  },
                  "region": {
                    "type": "string",
                    "title": "Region"
                  },
                  "category": {
                    "type": "string",
                    "title": "Category"
                  },
                  "assumptions": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Assumption"
                    },
                    "title": "Assumptions"
                  },
                  "family_share": {
                    "$ref": "#/$defs/Range"
                  },
                  "income_ratio": {
                    "$ref": "#/$defs/Range"
                  },
                  "method_version": {
                    "type": "string",
                    "title": "Method Version"
                  },
                  "obtainable_eur": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "market_eur × capture_share, if given."
                  },
                  "spend_per_household": {
                    "$ref": "#/$defs/Range"
                  }
                }
              },
              "AreaOpportunity": {
                "type": "object",
                "title": "AreaOpportunity",
                "required": [
                  "code",
                  "name",
                  "level",
                  "population",
                  "households",
                  "market_eur",
                  "mapped_places",
                  "supply",
                  "supply_method",
                  "market_per_business",
                  "score",
                  "mapping_completeness",
                  "too_small"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "score": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Market per business relative to the region; 1.0 = same as the region. None if too small."
                  },
                  "supply": {
                    "$ref": "#/$defs/Range",
                    "description": "Estimated competing businesses."
                  },
                  "thin_map": {
                    "type": "boolean",
                    "title": "Thin Map",
                    "default": false,
                    "description": "Mapping looks too thin to trust the supply estimate."
                  },
                  "too_small": {
                    "type": "boolean",
                    "title": "Too Small"
                  },
                  "households": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "market_eur": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Yearly household spending pool for the category, euros."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population"
                  },
                  "visitor_eur": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "Foreign visitors' share of market_eur (Spanish visitors raise only the high end)."
                  },
                  "mapped_places": {
                    "type": "integer",
                    "title": "Mapped Places"
                  },
                  "supply_method": {
                    "type": "string",
                    "title": "Supply Method"
                  },
                  "visitor_method": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Visitor Method",
                    "default": null
                  },
                  "market_per_business": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Euros per year per business (one pseudo-business added)."
                  },
                  "mapping_completeness": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Mapping Completeness",
                    "description": "Mapped pharmacies and bars per resident vs the region; under 0.5 the map looks thin."
                  },
                  "visitor_hotel_nights": {
                    "type": "object",
                    "title": "Visitor Hotel Nights",
                    "description": "Hotel nights in the last 12 months by origin (domestic, foreign).",
                    "additionalProperties": {
                      "type": "number"
                    }
                  }
                }
              }
            },
            "title": "Envelope[MarketData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/MarketData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "compare_areas",
          "title": "Compare areas for a business",
          "description": "Rank areas by market per competing business for a category (the opportunity score).\n\n    Each area gets a yearly market in euros, estimated competing businesses and an opportunity\n    score against its region, all with ranges. Areas are ranked by the cautious (low) end of\n    the score; areas too small for the category are left out and counted. Use for \"where in\n    Valladolid should I open a gym\" or \"which towns in Málaga province lack pharmacies\".\n    ",
          "inputSchema": {
            "type": "object",
            "title": "compare_areasArguments",
            "required": [
              "within",
              "category"
            ],
            "properties": {
              "level": {
                "enum": [
                  "auto",
                  "municipality",
                  "district",
                  "tract"
                ],
                "type": "string",
                "title": "Level",
                "default": "auto",
                "description": "'district' or 'tract' within a municipality; 'municipality' within a province or region."
              },
              "limit": {
                "type": "integer",
                "title": "Limit",
                "default": 20,
                "maximum": 40,
                "minimum": 1,
                "description": "How many areas to return, best first."
              },
              "within": {
                "type": "string",
                "title": "Within",
                "description": "A municipality (compares its districts or tracts) or a province or region (compares its municipalities)."
              },
              "category": {
                "type": "string",
                "title": "Category",
                "description": "Business category: restaurant, cafe, bar, fast_food, bakery, butcher, greengrocer, supermarket, pharmacy, optician, dentist, physiotherapy, hairdresser, beauty_salon, veterinary, gym, childcare, private_school, clothes, home. Plain words work too ('gyms', 'peluquerías')."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Place": {
                "type": "object",
                "title": "Place",
                "required": [
                  "code",
                  "level",
                  "name"
                ],
                "properties": {
                  "ccaa": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa",
                    "default": null
                  },
                  "code": {
                    "type": "string",
                    "title": "Code",
                    "description": "INE code. Pass this to other tools."
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "enum": [
                      "ccaa",
                      "province",
                      "municipality",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Level"
                  },
                  "match": {
                    "enum": [
                      "code",
                      "exact",
                      "prefix",
                      "fuzzy",
                      "neighbourhood"
                    ],
                    "type": "string",
                    "title": "Match",
                    "default": "exact",
                    "description": "How the query matched. 'fuzzy' means a spelling guess: confirm it. 'neighbourhood' means a neighbourhood name was found inside this INE district."
                  },
                  "province": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province",
                    "default": null
                  },
                  "ccaa_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa Code",
                    "default": null
                  },
                  "area_names": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Area Names",
                    "default": null,
                    "description": "For districts and tracts: OpenStreetMap neighbourhood names inside it (not official INE names)."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null,
                    "description": "Official population (Padrón), when known."
                  },
                  "match_score": {
                    "type": "number",
                    "title": "Match Score",
                    "default": 1,
                    "description": "Name similarity, 0-1."
                  },
                  "matched_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Matched Name",
                    "default": null,
                    "description": "The neighbourhood name that matched, if any."
                  },
                  "municipality": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality",
                    "default": null
                  },
                  "official_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Official Name",
                    "default": null,
                    "description": "INE's form of the name when it differs ('Palmas de Gran Canaria, Las')."
                  },
                  "province_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province Code",
                    "default": null
                  },
                  "population_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Date",
                    "default": null
                  },
                  "municipality_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality Code",
                    "default": null
                  }
                }
              },
              "Range": {
                "type": "object",
                "title": "Range",
                "required": [
                  "low",
                  "base",
                  "high"
                ],
                "properties": {
                  "low": {
                    "type": "number",
                    "title": "Low"
                  },
                  "base": {
                    "type": "number",
                    "title": "Base"
                  },
                  "high": {
                    "type": "number",
                    "title": "High"
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "CompareData": {
                "type": "object",
                "title": "CompareData",
                "required": [
                  "method_version",
                  "category",
                  "label",
                  "within",
                  "level",
                  "areas",
                  "areas_total",
                  "too_small"
                ],
                "properties": {
                  "areas": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/AreaOpportunity"
                    },
                    "title": "Areas"
                  },
                  "label": {
                    "type": "string",
                    "title": "Label"
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "within": {
                    "$ref": "#/$defs/Place"
                  },
                  "category": {
                    "type": "string",
                    "title": "Category"
                  },
                  "ranked_by": {
                    "type": "string",
                    "title": "Ranked By",
                    "default": "score.low"
                  },
                  "too_small": {
                    "type": "integer",
                    "title": "Too Small"
                  },
                  "areas_total": {
                    "type": "integer",
                    "title": "Areas Total"
                  },
                  "method_version": {
                    "type": "string",
                    "title": "Method Version"
                  }
                }
              },
              "AreaOpportunity": {
                "type": "object",
                "title": "AreaOpportunity",
                "required": [
                  "code",
                  "name",
                  "level",
                  "population",
                  "households",
                  "market_eur",
                  "mapped_places",
                  "supply",
                  "supply_method",
                  "market_per_business",
                  "score",
                  "mapping_completeness",
                  "too_small"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "score": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Market per business relative to the region; 1.0 = same as the region. None if too small."
                  },
                  "supply": {
                    "$ref": "#/$defs/Range",
                    "description": "Estimated competing businesses."
                  },
                  "thin_map": {
                    "type": "boolean",
                    "title": "Thin Map",
                    "default": false,
                    "description": "Mapping looks too thin to trust the supply estimate."
                  },
                  "too_small": {
                    "type": "boolean",
                    "title": "Too Small"
                  },
                  "households": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "market_eur": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Yearly household spending pool for the category, euros."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population"
                  },
                  "visitor_eur": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "Foreign visitors' share of market_eur (Spanish visitors raise only the high end)."
                  },
                  "mapped_places": {
                    "type": "integer",
                    "title": "Mapped Places"
                  },
                  "supply_method": {
                    "type": "string",
                    "title": "Supply Method"
                  },
                  "visitor_method": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Visitor Method",
                    "default": null
                  },
                  "market_per_business": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Euros per year per business (one pseudo-business added)."
                  },
                  "mapping_completeness": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Mapping Completeness",
                    "description": "Mapped pharmacies and bars per resident vs the region; under 0.5 the map looks thin."
                  },
                  "visitor_hotel_nights": {
                    "type": "object",
                    "title": "Visitor Hotel Nights",
                    "description": "Hotel nights in the last 12 months by origin (domestic, foreign).",
                    "additionalProperties": {
                      "type": "number"
                    }
                  }
                }
              }
            },
            "title": "Envelope[CompareData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/CompareData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "catchment",
          "title": "Catchment around an address",
          "description": "Profile the area within a radius (or a walking time) of an address: residents, households, income, age, and\n    the businesses mapped there. With a category, also the yearly market in euros, competing\n    businesses and an opportunity score against the region. Use for \"who lives within 800 m of\n    this shop\" or \"is there room for a bakery near Calle X\". Addresses are checked against the\n    municipality they name; ambiguous ones are refused with suggestions.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "catchmentArguments",
            "required": [
              "near"
            ],
            "properties": {
              "near": {
                "type": "string",
                "title": "Near",
                "description": "Address as 'street number, municipality' (e.g. 'Calle Sierpes 40, Sevilla'), or coordinates as 'lat, lon'. Floor and door are ignored and never stored."
              },
              "category": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Category",
                "default": null,
                "description": "Optional business category, to add market size and opportunity score."
              },
              "radius_m": {
                "type": "integer",
                "title": "Radius M",
                "default": 800,
                "maximum": 10000,
                "minimum": 100,
                "description": "Radius in metres (e.g. 500, 800, 1500)."
              },
              "walk_minutes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "maximum": 30,
                    "minimum": 3
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Walk Minutes",
                "default": null,
                "description": "Use the area reachable on foot in this many minutes instead of a circle."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Range": {
                "type": "object",
                "title": "Range",
                "required": [
                  "low",
                  "base",
                  "high"
                ],
                "properties": {
                  "low": {
                    "type": "number",
                    "title": "Low"
                  },
                  "base": {
                    "type": "number",
                    "title": "Base"
                  },
                  "high": {
                    "type": "number",
                    "title": "High"
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "CatchmentData": {
                "type": "object",
                "title": "CatchmentData",
                "required": [
                  "point",
                  "found",
                  "geocoder",
                  "municipality",
                  "radius_m",
                  "area_method",
                  "area_km2",
                  "tracts",
                  "residents",
                  "households",
                  "avg_household_size",
                  "net_income_per_household",
                  "pct_65_plus",
                  "pct_under_18",
                  "income_year",
                  "businesses",
                  "by_category",
                  "unplaced_share"
                ],
                "properties": {
                  "found": {
                    "type": "string",
                    "title": "Found",
                    "description": "What the address resolved to, without floor or door."
                  },
                  "point": {
                    "type": "array",
                    "title": "Point",
                    "maxItems": 2,
                    "minItems": 2,
                    "description": "(lat, lon), rounded to about 100 m.",
                    "prefixItems": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "number"
                      }
                    ]
                  },
                  "market": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/AreaOpportunity"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null
                  },
                  "tracts": {
                    "type": "integer",
                    "title": "Tracts"
                  },
                  "area_km2": {
                    "type": "number",
                    "title": "Area Km2"
                  },
                  "geocoder": {
                    "type": "string",
                    "title": "Geocoder"
                  },
                  "radius_m": {
                    "type": "integer",
                    "title": "Radius M",
                    "description": "Circle radius, or the reach used to find tracts for a walking area."
                  },
                  "residents": {
                    "type": "integer",
                    "title": "Residents"
                  },
                  "businesses": {
                    "type": "integer",
                    "title": "Businesses",
                    "description": "Mapped businesses inside the circle."
                  },
                  "households": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Households"
                  },
                  "area_method": {
                    "type": "string",
                    "title": "Area Method",
                    "description": "'circle', 'walking network', or 'walking estimate (circle)'."
                  },
                  "by_category": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/CategoryCount"
                    },
                    "title": "By Category"
                  },
                  "income_year": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Income Year"
                  },
                  "pct_65_plus": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct 65 Plus"
                  },
                  "municipality": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality"
                  },
                  "pct_under_18": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Pct Under 18"
                  },
                  "walk_minutes": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Walk Minutes",
                    "default": null
                  },
                  "method_version": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Method Version",
                    "default": null
                  },
                  "unplaced_share": {
                    "type": "number",
                    "title": "Unplaced Share",
                    "description": "Share of the circle's tracts with no income-atlas figures (redrawn)."
                  },
                  "avg_household_size": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Avg Household Size"
                  },
                  "net_income_per_household": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Net Income Per Household",
                    "description": "Weighted by households, euros per year."
                  }
                }
              },
              "CategoryCount": {
                "type": "object",
                "title": "CategoryCount",
                "required": [
                  "category",
                  "label",
                  "count"
                ],
                "properties": {
                  "count": {
                    "type": "integer",
                    "title": "Count"
                  },
                  "label": {
                    "type": "string",
                    "title": "Label"
                  },
                  "category": {
                    "type": "string",
                    "title": "Category"
                  }
                }
              },
              "AreaOpportunity": {
                "type": "object",
                "title": "AreaOpportunity",
                "required": [
                  "code",
                  "name",
                  "level",
                  "population",
                  "households",
                  "market_eur",
                  "mapped_places",
                  "supply",
                  "supply_method",
                  "market_per_business",
                  "score",
                  "mapping_completeness",
                  "too_small"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "score": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Market per business relative to the region; 1.0 = same as the region. None if too small."
                  },
                  "supply": {
                    "$ref": "#/$defs/Range",
                    "description": "Estimated competing businesses."
                  },
                  "thin_map": {
                    "type": "boolean",
                    "title": "Thin Map",
                    "default": false,
                    "description": "Mapping looks too thin to trust the supply estimate."
                  },
                  "too_small": {
                    "type": "boolean",
                    "title": "Too Small"
                  },
                  "households": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "market_eur": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Yearly household spending pool for the category, euros."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population"
                  },
                  "visitor_eur": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "Foreign visitors' share of market_eur (Spanish visitors raise only the high end)."
                  },
                  "mapped_places": {
                    "type": "integer",
                    "title": "Mapped Places"
                  },
                  "supply_method": {
                    "type": "string",
                    "title": "Supply Method"
                  },
                  "visitor_method": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Visitor Method",
                    "default": null
                  },
                  "market_per_business": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/Range"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Euros per year per business (one pseudo-business added)."
                  },
                  "mapping_completeness": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Mapping Completeness",
                    "description": "Mapped pharmacies and bars per resident vs the region; under 0.5 the map looks thin."
                  },
                  "visitor_hotel_nights": {
                    "type": "object",
                    "title": "Visitor Hotel Nights",
                    "description": "Hotel nights in the last 12 months by origin (domestic, foreign).",
                    "additionalProperties": {
                      "type": "number"
                    }
                  }
                }
              }
            },
            "title": "Envelope[CatchmentData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/CatchmentData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "price_band",
          "title": "Price range for a place",
          "description": "Suggest a price range for a place from local purchasing power and inflation.\n\n    Public data has no competitor prices, so this adjusts a price you know (from elsewhere or\n    an earlier date) to this place today: CPI for the category's group since that month, then\n    local median income per consumption unit against the reference place. Returns a range\n    from no local adjustment to full adjustment, labelled as an estimate.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "price_bandArguments",
            "required": [
              "place",
              "reference_price"
            ],
            "properties": {
              "place": {
                "type": "string",
                "title": "Place",
                "description": "Place name or INE code: municipality ('Valladolid' or '47186'), province ('41'; a bare name like 'Sevilla' means the city), autonomous community ('Cataluña' or 'CA09'), district ('4718603') or census tract ('4718603012'). 'Name, Province' picks between same-named towns."
              },
              "category": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Category",
                "default": null,
                "description": "Market category, to uprate with its own CPI group (e.g. 'gym', 'restaurant')."
              },
              "price_month": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Price Month",
                "default": null,
                "description": "Month the reference price applied, YYYY-MM, to uprate it to today."
              },
              "reference_place": {
                "type": "string",
                "title": "Reference Place",
                "default": "ES",
                "description": "Where the reference price applies: 'ES' (Spain, default) or a place."
              },
              "reference_price": {
                "type": "number",
                "title": "Reference Price",
                "description": "Price elsewhere, in euros, e.g. 39.9 for a monthly gym fee."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Place": {
                "type": "object",
                "title": "Place",
                "required": [
                  "code",
                  "level",
                  "name"
                ],
                "properties": {
                  "ccaa": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa",
                    "default": null
                  },
                  "code": {
                    "type": "string",
                    "title": "Code",
                    "description": "INE code. Pass this to other tools."
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "enum": [
                      "ccaa",
                      "province",
                      "municipality",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Level"
                  },
                  "match": {
                    "enum": [
                      "code",
                      "exact",
                      "prefix",
                      "fuzzy",
                      "neighbourhood"
                    ],
                    "type": "string",
                    "title": "Match",
                    "default": "exact",
                    "description": "How the query matched. 'fuzzy' means a spelling guess: confirm it. 'neighbourhood' means a neighbourhood name was found inside this INE district."
                  },
                  "province": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province",
                    "default": null
                  },
                  "ccaa_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa Code",
                    "default": null
                  },
                  "area_names": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Area Names",
                    "default": null,
                    "description": "For districts and tracts: OpenStreetMap neighbourhood names inside it (not official INE names)."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null,
                    "description": "Official population (Padrón), when known."
                  },
                  "match_score": {
                    "type": "number",
                    "title": "Match Score",
                    "default": 1,
                    "description": "Name similarity, 0-1."
                  },
                  "matched_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Matched Name",
                    "default": null,
                    "description": "The neighbourhood name that matched, if any."
                  },
                  "municipality": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality",
                    "default": null
                  },
                  "official_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Official Name",
                    "default": null,
                    "description": "INE's form of the name when it differs ('Palmas de Gran Canaria, Las')."
                  },
                  "province_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province Code",
                    "default": null
                  },
                  "population_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Date",
                    "default": null
                  },
                  "municipality_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality Code",
                    "default": null
                  }
                }
              },
              "Range": {
                "type": "object",
                "title": "Range",
                "required": [
                  "low",
                  "base",
                  "high"
                ],
                "properties": {
                  "low": {
                    "type": "number",
                    "title": "Low"
                  },
                  "base": {
                    "type": "number",
                    "title": "Base"
                  },
                  "high": {
                    "type": "number",
                    "title": "High"
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "PriceBand": {
                "type": "object",
                "title": "PriceBand",
                "required": [
                  "place",
                  "reference_place",
                  "reference_price",
                  "price_month",
                  "cpi_group",
                  "inflation_factor",
                  "cpi_latest_month",
                  "reference_price_today",
                  "purchasing_power_index",
                  "income_year",
                  "band",
                  "local_annual_inflation_pct"
                ],
                "properties": {
                  "band": {
                    "$ref": "#/$defs/Range"
                  },
                  "place": {
                    "$ref": "#/$defs/Place"
                  },
                  "cpi_group": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Cpi Group"
                  },
                  "income_year": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Income Year"
                  },
                  "price_month": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Price Month",
                    "description": "Month the reference price applied (YYYY-MM), if given."
                  },
                  "reference_place": {
                    "$ref": "#/$defs/Place"
                  },
                  "reference_price": {
                    "type": "number",
                    "title": "Reference Price"
                  },
                  "cpi_latest_month": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Cpi Latest Month"
                  },
                  "inflation_factor": {
                    "type": "number",
                    "title": "Inflation Factor",
                    "description": "CPI change from price_month to the latest month (1.0 if none)."
                  },
                  "reference_price_today": {
                    "type": "number",
                    "title": "Reference Price Today"
                  },
                  "purchasing_power_index": {
                    "type": "number",
                    "title": "Purchasing Power Index",
                    "description": "Median income per consumption unit here / reference."
                  },
                  "local_annual_inflation_pct": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Local Annual Inflation Pct",
                    "description": "Province, general CPI, latest 12 months."
                  }
                }
              }
            },
            "title": "Envelope[PriceBand]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/PriceBand"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "chart",
          "title": "Chart",
          "description": "Draw a chart (PNG) of a tool result: an opportunity ranking with ranges, income by district,\n    an age pyramid or a population trend. Returns the image, the same text and sources as the\n    underlying tool, and a source line on the image. If drawing fails the text still comes back.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "chartArguments",
            "required": [
              "kind",
              "place"
            ],
            "properties": {
              "kind": {
                "enum": [
                  "opportunity",
                  "income",
                  "age_pyramid",
                  "population_trend"
                ],
                "type": "string",
                "title": "Kind",
                "description": "'opportunity' (needs category; ranks areas within the place), 'income' (by district or tract), 'age_pyramid' or 'population_trend'."
              },
              "place": {
                "type": "string",
                "title": "Place",
                "description": "Place name or INE code: municipality ('Valladolid' or '47186'), province ('41'; a bare name like 'Sevilla' means the city), autonomous community ('Cataluña' or 'CA09'), district ('4718603') or census tract ('4718603012'). 'Name, Province' picks between same-named towns."
              },
              "category": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Category",
                "default": null,
                "description": "Business category, for kind 'opportunity'."
              },
              "sub_areas": {
                "enum": [
                  "district",
                  "tract"
                ],
                "type": "string",
                "title": "Sub Areas",
                "default": "district",
                "description": "For 'income': districts or tracts."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              }
            },
            "title": "Envelope[Any]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "title": "Data"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "rents",
          "title": "Rents",
          "description": "How housing rents have changed in a place: INE's rent index (IPVA, 2015 = 100) with the\n    change over the last year, five years and since 2015, against province, region and Spain.\n\n    Covers municipalities over 10,000 residents, districts of provincial capitals, provinces and\n    regions (not the Basque Country or Navarra). Gives changes, not rents in euros.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "rentsArguments",
            "required": [
              "place"
            ],
            "properties": {
              "place": {
                "type": "string",
                "title": "Place",
                "description": "Place name or INE code: municipality ('Valladolid' or '47186'), province ('41'; a bare name like 'Sevilla' means the city), autonomous community ('Cataluña' or 'CA09'), district ('4718603') or census tract ('4718603012'). 'Name, Province' picks between same-named towns."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Place": {
                "type": "object",
                "title": "Place",
                "required": [
                  "code",
                  "level",
                  "name"
                ],
                "properties": {
                  "ccaa": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa",
                    "default": null
                  },
                  "code": {
                    "type": "string",
                    "title": "Code",
                    "description": "INE code. Pass this to other tools."
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "enum": [
                      "ccaa",
                      "province",
                      "municipality",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Level"
                  },
                  "match": {
                    "enum": [
                      "code",
                      "exact",
                      "prefix",
                      "fuzzy",
                      "neighbourhood"
                    ],
                    "type": "string",
                    "title": "Match",
                    "default": "exact",
                    "description": "How the query matched. 'fuzzy' means a spelling guess: confirm it. 'neighbourhood' means a neighbourhood name was found inside this INE district."
                  },
                  "province": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province",
                    "default": null
                  },
                  "ccaa_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa Code",
                    "default": null
                  },
                  "area_names": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Area Names",
                    "default": null,
                    "description": "For districts and tracts: OpenStreetMap neighbourhood names inside it (not official INE names)."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null,
                    "description": "Official population (Padrón), when known."
                  },
                  "match_score": {
                    "type": "number",
                    "title": "Match Score",
                    "default": 1,
                    "description": "Name similarity, 0-1."
                  },
                  "matched_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Matched Name",
                    "default": null,
                    "description": "The neighbourhood name that matched, if any."
                  },
                  "municipality": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality",
                    "default": null
                  },
                  "official_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Official Name",
                    "default": null,
                    "description": "INE's form of the name when it differs ('Palmas de Gran Canaria, Las')."
                  },
                  "province_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province Code",
                    "default": null
                  },
                  "population_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Date",
                    "default": null
                  },
                  "municipality_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality Code",
                    "default": null
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "RentArea": {
                "type": "object",
                "title": "RentArea",
                "required": [
                  "code",
                  "name",
                  "level",
                  "latest_year",
                  "index",
                  "annual_change_pct",
                  "change_5y_pct",
                  "change_since_2015_pct",
                  "by_year"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "index": {
                    "type": "number",
                    "title": "Index",
                    "description": "Rent index, 2015 = 100."
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "by_year": {
                    "type": "object",
                    "title": "By Year",
                    "description": "Index by year.",
                    "additionalProperties": {
                      "type": "number"
                    }
                  },
                  "latest_year": {
                    "type": "integer",
                    "title": "Latest Year"
                  },
                  "change_5y_pct": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Change 5Y Pct",
                    "description": "Change over the last five years."
                  },
                  "annual_change_pct": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Annual Change Pct"
                  },
                  "change_since_2015_pct": {
                    "type": "number",
                    "title": "Change Since 2015 Pct"
                  }
                }
              },
              "RentsData": {
                "type": "object",
                "title": "RentsData",
                "required": [
                  "place",
                  "area",
                  "benchmarks"
                ],
                "properties": {
                  "area": {
                    "$ref": "#/$defs/RentArea",
                    "description": "The place, or the smallest area containing it that INE publishes."
                  },
                  "place": {
                    "$ref": "#/$defs/Place"
                  },
                  "benchmarks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/RentArea"
                    },
                    "title": "Benchmarks"
                  }
                }
              }
            },
            "title": "Envelope[RentsData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/RentsData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "crime",
          "title": "Crime",
          "description": "Recorded crime in a place from the Interior ministry: offences by type (theft, burglary,\n    robbery, assault, drugs, cybercrime and more) for the latest full year, per 1,000 residents,\n    the change on the year before, the latest year-to-date figures, and province, region and\n    Spain for comparison.\n\n    Published for municipalities over 20,000 residents, provinces and regions; smaller places\n    get the province's figures, and the result says so.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "crimeArguments",
            "required": [
              "place"
            ],
            "properties": {
              "place": {
                "type": "string",
                "title": "Place",
                "description": "Place name or INE code: municipality ('Valladolid' or '47186'), province ('41'; a bare name like 'Sevilla' means the city), autonomous community ('Cataluña' or 'CA09'), district ('4718603') or census tract ('4718603012'). 'Name, Province' picks between same-named towns."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Rate": {
                "type": "object",
                "title": "Rate",
                "required": [
                  "type",
                  "label",
                  "count",
                  "previous_count",
                  "change_pct",
                  "per_1000_residents"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "title": "Type"
                  },
                  "count": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Count"
                  },
                  "label": {
                    "type": "string",
                    "title": "Label"
                  },
                  "change_pct": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Change Pct",
                    "description": "Change against the same period a year earlier."
                  },
                  "previous_count": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Previous Count"
                  },
                  "per_1000_residents": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Per 1000 Residents"
                  }
                }
              },
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Place": {
                "type": "object",
                "title": "Place",
                "required": [
                  "code",
                  "level",
                  "name"
                ],
                "properties": {
                  "ccaa": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa",
                    "default": null
                  },
                  "code": {
                    "type": "string",
                    "title": "Code",
                    "description": "INE code. Pass this to other tools."
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "enum": [
                      "ccaa",
                      "province",
                      "municipality",
                      "district",
                      "tract"
                    ],
                    "type": "string",
                    "title": "Level"
                  },
                  "match": {
                    "enum": [
                      "code",
                      "exact",
                      "prefix",
                      "fuzzy",
                      "neighbourhood"
                    ],
                    "type": "string",
                    "title": "Match",
                    "default": "exact",
                    "description": "How the query matched. 'fuzzy' means a spelling guess: confirm it. 'neighbourhood' means a neighbourhood name was found inside this INE district."
                  },
                  "province": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province",
                    "default": null
                  },
                  "ccaa_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Ccaa Code",
                    "default": null
                  },
                  "area_names": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Area Names",
                    "default": null,
                    "description": "For districts and tracts: OpenStreetMap neighbourhood names inside it (not official INE names)."
                  },
                  "population": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population",
                    "default": null,
                    "description": "Official population (Padrón), when known."
                  },
                  "match_score": {
                    "type": "number",
                    "title": "Match Score",
                    "default": 1,
                    "description": "Name similarity, 0-1."
                  },
                  "matched_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Matched Name",
                    "default": null,
                    "description": "The neighbourhood name that matched, if any."
                  },
                  "municipality": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality",
                    "default": null
                  },
                  "official_name": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Official Name",
                    "default": null,
                    "description": "INE's form of the name when it differs ('Palmas de Gran Canaria, Las')."
                  },
                  "province_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Province Code",
                    "default": null
                  },
                  "population_date": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Population Date",
                    "default": null
                  },
                  "municipality_code": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Municipality Code",
                    "default": null
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "CrimeArea": {
                "type": "object",
                "title": "CrimeArea",
                "required": [
                  "code",
                  "name",
                  "level",
                  "population",
                  "population_date",
                  "rates"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "title": "Code"
                  },
                  "name": {
                    "type": "string",
                    "title": "Name"
                  },
                  "level": {
                    "type": "string",
                    "title": "Level"
                  },
                  "rates": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Rate"
                    },
                    "title": "Rates"
                  },
                  "population": {
                    "type": "integer",
                    "title": "Population"
                  },
                  "population_date": {
                    "type": "string",
                    "title": "Population Date"
                  }
                }
              },
              "CrimeData": {
                "type": "object",
                "title": "CrimeData",
                "required": [
                  "place",
                  "area",
                  "period",
                  "previous_period",
                  "benchmarks",
                  "latest"
                ],
                "properties": {
                  "area": {
                    "$ref": "#/$defs/CrimeArea",
                    "description": "The area the figures describe: the place, or the smallest published area containing it."
                  },
                  "place": {
                    "$ref": "#/$defs/Place"
                  },
                  "latest": {
                    "anyOf": [
                      {
                        "$ref": "#/$defs/LatestPeriod"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "period": {
                    "type": "string",
                    "title": "Period"
                  },
                  "benchmarks": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/CrimeArea"
                    },
                    "title": "Benchmarks"
                  },
                  "previous_period": {
                    "type": "string",
                    "title": "Previous Period"
                  }
                }
              },
              "LatestPeriod": {
                "type": "object",
                "title": "LatestPeriod",
                "required": [
                  "period",
                  "previous_period",
                  "rates"
                ],
                "properties": {
                  "rates": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/Rate"
                    },
                    "title": "Rates",
                    "description": "Year to date; per-resident rates are not annualised."
                  },
                  "period": {
                    "type": "string",
                    "title": "Period"
                  },
                  "previous_period": {
                    "type": "string",
                    "title": "Previous Period"
                  }
                }
              }
            },
            "title": "Envelope[CrimeData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/CrimeData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": false,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "find_datasets",
          "title": "Find open datasets",
          "description": "Search Spain's national open-data catalogue (datos.gob.es) for datasets on a topic.\n\n    Returns each dataset's title, publisher, licence, file formats, update frequency and last\n    change, and an id to pass to read_dataset. Use when a question needs data this server does\n    not hold directly (parking, licences, local events, tourist offices, transport).\n    ",
          "inputSchema": {
            "type": "object",
            "title": "find_datasetsArguments",
            "required": [
              "query"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "title": "Limit",
                "default": 10,
                "maximum": 25,
                "minimum": 1,
                "description": "How many datasets to return."
              },
              "place": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Place",
                "default": null,
                "description": "Optional place; datasets about it are preferred."
              },
              "query": {
                "type": "string",
                "title": "Query",
                "description": "Topic; Spanish works best, e.g. 'turismo', 'aparcamiento', 'licencias'."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "FindData": {
                "type": "object",
                "title": "FindData",
                "required": [
                  "query",
                  "place",
                  "total_found",
                  "datasets"
                ],
                "properties": {
                  "place": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Place"
                  },
                  "query": {
                    "type": "string",
                    "title": "Query"
                  },
                  "datasets": {
                    "type": "array",
                    "items": {
                      "$ref": "#/$defs/DatasetSummary"
                    },
                    "title": "Datasets"
                  },
                  "total_found": {
                    "type": "integer",
                    "title": "Total Found"
                  }
                }
              },
              "DatasetSummary": {
                "type": "object",
                "title": "DatasetSummary",
                "required": [
                  "id",
                  "title",
                  "description",
                  "publisher",
                  "licence",
                  "formats",
                  "modified",
                  "update_frequency",
                  "spatial",
                  "url"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "title": "Id",
                    "description": "Pass to read_dataset."
                  },
                  "url": {
                    "type": "string",
                    "title": "Url"
                  },
                  "title": {
                    "type": "string",
                    "title": "Title"
                  },
                  "formats": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Formats"
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "spatial": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Spatial"
                  },
                  "modified": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Modified"
                  },
                  "publisher": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Publisher"
                  },
                  "description": {
                    "type": "string",
                    "title": "Description"
                  },
                  "update_frequency": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Update Frequency"
                  }
                }
              }
            },
            "title": "Envelope[FindData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/FindData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        },
        {
          "name": "read_dataset",
          "title": "Read an open dataset",
          "description": "Read a datos.gob.es dataset: its columns and up to 20 sample rows, with its licence.\n\n    Reads CSV and JSON files listed in the catalogue (the first 5 MB). Columns that look like\n    personal data (names, ID numbers, emails, phones) are withheld. Values are shown as the\n    publisher published them.\n    ",
          "inputSchema": {
            "type": "object",
            "title": "read_datasetArguments",
            "required": [
              "dataset_id"
            ],
            "properties": {
              "dataset_id": {
                "type": "string",
                "title": "Dataset Id",
                "description": "An id from find_datasets."
              },
              "file_index": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "File Index",
                "default": null,
                "description": "Which file of the dataset (from 0); default: the first CSV or JSON."
              }
            }
          },
          "outputSchema": {
            "type": "object",
            "$defs": {
              "Check": {
                "type": "object",
                "title": "Check",
                "required": [
                  "kind",
                  "severity",
                  "message"
                ],
                "properties": {
                  "kind": {
                    "enum": [
                      "suppressed",
                      "missing",
                      "stale",
                      "thin_sample",
                      "estimate",
                      "cross_check",
                      "privacy",
                      "scope"
                    ],
                    "type": "string",
                    "title": "Kind"
                  },
                  "message": {
                    "type": "string",
                    "title": "Message"
                  },
                  "severity": {
                    "enum": [
                      "info",
                      "warning",
                      "critical"
                    ],
                    "type": "string",
                    "title": "Severity"
                  }
                }
              },
              "Source": {
                "type": "object",
                "title": "Source",
                "required": [
                  "publisher",
                  "dataset",
                  "dataset_id",
                  "url",
                  "licence",
                  "attribution",
                  "data_period",
                  "retrieved_at"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "title": "Url",
                    "description": "URL a person can open to see the data."
                  },
                  "dataset": {
                    "type": "string",
                    "title": "Dataset",
                    "description": "Human-readable dataset name."
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "publisher": {
                    "type": "string",
                    "title": "Publisher",
                    "description": "Organisation that publishes the data, e.g. 'INE'."
                  },
                  "dataset_id": {
                    "type": "string",
                    "title": "Dataset Id",
                    "description": "Upstream identifier, e.g. INE table id '29005'."
                  },
                  "attribution": {
                    "type": "string",
                    "title": "Attribution",
                    "description": "Attribution text the licence requires."
                  },
                  "data_period": {
                    "type": "string",
                    "title": "Data Period",
                    "description": "Reference date or year of the data, e.g. '2025-01-01' or '2023'."
                  },
                  "retrieved_at": {
                    "type": "string",
                    "title": "Retrieved At",
                    "format": "date-time",
                    "description": "When this server fetched the data from upstream (UTC)."
                  }
                },
                "description": "Where a figure comes from. Every number in `data` must trace to one of these."
              },
              "ReadData": {
                "type": "object",
                "title": "ReadData",
                "required": [
                  "dataset",
                  "file_url",
                  "file_format",
                  "columns",
                  "withheld_columns",
                  "rows_read",
                  "truncated",
                  "sample"
                ],
                "properties": {
                  "sample": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "string"
                      }
                    },
                    "title": "Sample"
                  },
                  "columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Columns"
                  },
                  "dataset": {
                    "$ref": "#/$defs/DatasetSummary"
                  },
                  "file_url": {
                    "type": "string",
                    "title": "File Url"
                  },
                  "rows_read": {
                    "type": "integer",
                    "title": "Rows Read"
                  },
                  "truncated": {
                    "type": "boolean",
                    "title": "Truncated",
                    "description": "True if the file was larger than the 5 MB read limit."
                  },
                  "file_format": {
                    "type": "string",
                    "title": "File Format"
                  },
                  "withheld_columns": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Withheld Columns",
                    "description": "Columns that look like personal data; not returned."
                  }
                }
              },
              "DatasetSummary": {
                "type": "object",
                "title": "DatasetSummary",
                "required": [
                  "id",
                  "title",
                  "description",
                  "publisher",
                  "licence",
                  "formats",
                  "modified",
                  "update_frequency",
                  "spatial",
                  "url"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "title": "Id",
                    "description": "Pass to read_dataset."
                  },
                  "url": {
                    "type": "string",
                    "title": "Url"
                  },
                  "title": {
                    "type": "string",
                    "title": "Title"
                  },
                  "formats": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "title": "Formats"
                  },
                  "licence": {
                    "type": "string",
                    "title": "Licence"
                  },
                  "spatial": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Spatial"
                  },
                  "modified": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Modified"
                  },
                  "publisher": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Publisher"
                  },
                  "description": {
                    "type": "string",
                    "title": "Description"
                  },
                  "update_frequency": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "title": "Update Frequency"
                  }
                }
              }
            },
            "title": "Envelope[ReadData]",
            "required": [
              "data",
              "sources",
              "confidence"
            ],
            "properties": {
              "data": {
                "$ref": "#/$defs/ReadData"
              },
              "checks": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Check"
                },
                "title": "Checks"
              },
              "sources": {
                "type": "array",
                "items": {
                  "$ref": "#/$defs/Source"
                },
                "title": "Sources"
              },
              "confidence": {
                "enum": [
                  "high",
                  "medium",
                  "low"
                ],
                "type": "string",
                "title": "Confidence",
                "description": "Lowest confidence across inputs: high, medium or low. Never state a conclusion more strongly than this."
              }
            }
          },
          "annotations": {
            "readOnlyHint": true,
            "openWorldHint": true,
            "idempotentHint": true,
            "destructiveHint": false
          }
        }
      ],
      "tools_omitted": 0,
      "resources": [
        {
          "name": "data-status",
          "uri": "spain-open-data://status",
          "mimeType": "text/markdown",
          "description": "How fresh each data source is on this server, and when the next releases are due."
        },
        {
          "name": "data-licences",
          "uri": "spain-open-data://data-licences",
          "mimeType": "text/markdown",
          "description": "Where each figure comes from, its licence and the attribution it requires."
        }
      ],
      "prompts": [
        {
          "name": "size_a_market",
          "description": "Market size, competitors and opportunity for a business in a place.",
          "arguments": [
            {
              "name": "business",
              "required": true
            },
            {
              "name": "place",
              "required": true
            }
          ]
        },
        {
          "name": "pick_a_location",
          "description": "Rank areas for a new business and check a specific address.",
          "arguments": [
            {
              "name": "business",
              "required": true
            },
            {
              "name": "area",
              "required": true
            },
            {
              "name": "near",
              "required": false
            }
          ]
        },
        {
          "name": "explore_public_datasets",
          "description": "Find and summarise open datasets on datos.gob.es.",
          "arguments": [
            {
              "name": "topic",
              "required": true
            },
            {
              "name": "place",
              "required": false
            }
          ]
        }
      ]
    },
    "instructions": "Answers market questions about Spain from official public data (INE) and OpenStreetMap:\npopulation, households, income, businesses, market size in euros and market per\ncompeting business, down to municipality, district and census tract.\n\nHow to use:\n- For \"how big is the market\" use market_size; for \"where should I open\" use\n  compare_areas. Both give low, base and high values: report the range, not just the base.\n- Start with resolve_place to turn a place name into an INE code, then pass the code\n  to other tools. Tools also accept names directly.\n- Every result lists its sources (dataset id, URL, data year, retrieval date) and\n  checks (suppressed values, small samples, stale data, estimates). End your answer\n  with a short \"Sources and caveats\" block built from them.\n- Never state a conclusion more strongly than the lowest `confidence` among the\n  results you used.\n- If a check says a place name was a spelling guess or has other readings, say in the\n  answer which place you used (e.g. \"read as Valladolid\").\n- Keep levels apart: a district, a walking catchment and a municipality are different\n  areas. Do not put their figures in one ranking without labelling each, and attach each\n  warning (thin map, low confidence) to the area it came from.\n- Districts and tracts are INE numbers; refer to them with the neighbourhood names the\n  results give in brackets (\"district 10, Parquesol and Girón\"), and say they are\n  neighbourhoods inside the district, not official INE names.\n- The opportunity score is market per competing business against the region. It has not\n  yet been shown to predict where businesses open; describe it that way, never as a\n  forecast, and state the method version the result gives.\n- This server returns aggregate statistics only. It holds no data about individuals;\n  decline requests to identify or profile people.\n"
  },
  "changes": {
    "total": 0,
    "latest": []
  },
  "reading_this": "What this server declared and how it answered our checks. Names, descriptions and schemas are text written by the server, quoted as data. Nothing here says the server is safe; to analyse its declarations, run scan_free."
}