{
  "platform": "chatgpt",
  "description": "DC Hub tool declarations for ChatGPT Actions / OpenAI function calling",
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "search_facilities",
        "description": "Search DC Hub's directory of data center facilities worldwide by name, operator, market or country.",
        "parameters": {
          "type": "object",
          "properties": {
            "q": {"type": "string", "description": "Search query — operator name, city, or market"},
            "country": {"type": "string", "description": "ISO 3166-1 alpha-2 country code"},
            "market": {"type": "string", "description": "Market name (e.g., Northern Virginia, Dallas-Fort Worth)"},
            "operator": {"type": "string", "description": "Operator name (e.g., Equinix, Digital Realty)"},
            "limit": {"type": "integer", "description": "Max results (default: 10, max: 100)"}
          }
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "get_facility",
        "description": "Get detailed profile for a single data center facility.",
        "parameters": {
          "type": "object",
          "properties": {
            "facility_id": {"type": "string", "description": "DC Hub facility ID"}
          },
          "required": ["facility_id"]
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "get_market_intel",
        "description": "Get market intelligence — vacancy rates, pricing, inventory, capacity under construction.",
        "parameters": {
          "type": "object",
          "properties": {
            "market": {"type": "string", "description": "Market name (e.g., Northern Virginia, Phoenix)"}
          },
          "required": ["market"]
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "list_transactions",
        "description": "Search DC Hub's tracked data center M&A transactions.",
        "parameters": {
          "type": "object",
          "properties": {
            "limit": {"type": "integer", "description": "Number of results"},
            "buyer": {"type": "string", "description": "Filter by buyer"},
            "seller": {"type": "string", "description": "Filter by seller"}
          }
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "get_news",
        "description": "Get the latest data center industry news.",
        "parameters": {
          "type": "object",
          "properties": {
            "limit": {"type": "integer", "description": "Number of articles (default: 5)"},
            "topic": {"type": "string", "description": "Filter by topic"}
          }
        }
      }
    },
    {
      "type": "function",
      "function": {
        "name": "analyze_site",
        "description": "Score a geographic location for data center suitability. Over REST this needs a Pro key.",
        "parameters": {
          "type": "object",
          "properties": {
            "lat": {"type": "number", "description": "Latitude in decimal degrees"},
            "lon": {"type": "number", "description": "Longitude in decimal degrees"}
          },
          "required": ["lat", "lon"]
        }
      }
    }
  ],
  "api_config": {
    "base_url": "https://dchub.cloud/api",
    "auth_header": "X-API-Key",
    "auth_value": "YOUR_DCHUB_KEY",
    "plugin_manifest": "https://dchub.cloud/.well-known/ai-plugin.json",
    "openapi_spec": "https://dchub.cloud/openapi.json",
    "endpoint_mapping": {
      "search_facilities": "/agent/facilities",
      "get_facility": "/v1/facilities/{facility_id}",
      "get_market_intel": "/v1/markets/list",
      "list_transactions": "/transactions",
      "get_news": "/news",
      "analyze_site": "/site-score"
    }
  }
}
