{
  "openapi": "3.1.0",
  "info": {
    "title": "TechTools Network Info",
    "version": "1.0.0",
    "description": "Anonymous, read-only, no API key or parameters. No tool-specific rate limit. Results have Cache-Control: no-store. Each call describes its own connection. Time /ping from the calling client to measure HTTP latency. The public MCP at https://techtools.cz/mcp accepts network_info_connection with an empty arguments object."
  },
  "servers": [
    {
      "url": "https://techtools.cz/network-info-api"
    }
  ],
  "security": [],
  "paths": {
    "/ip": {
      "get": {
        "operationId": "getIp",
        "summary": "Read your public IP as text",
        "responses": {
          "200": {
            "description": "IP address followed by a newline.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "503": {
            "description": "The network edge could not supply connection metadata."
          }
        },
        "x-curl-example": "curl -fsS https://techtools.cz/network-info-api/ip"
      }
    },
    "/connection": {
      "get": {
        "operationId": "getConnection",
        "summary": "Inspect the current HTTP connection",
        "responses": {
          "200": {
            "description": "Observation at the TechTools HTTPS edge.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ip",
                    "ip_version",
                    "client_port",
                    "server_port",
                    "http_version",
                    "observed_at"
                  ],
                  "properties": {
                    "ip": {
                      "type": "string",
                      "description": "IPv4 or IPv6 address seen at the TechTools edge."
                    },
                    "ip_version": {
                      "type": "integer",
                      "enum": [
                        4,
                        6
                      ]
                    },
                    "client_port": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 65535,
                      "description": "Source port of this request at the edge, after any NAT or proxy."
                    },
                    "server_port": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 65535
                    },
                    "http_version": {
                      "type": "string",
                      "example": "HTTP/2.0"
                    },
                    "observed_at": {
                      "type": "string",
                      "format": "date-time",
                      "description": "UTC observation timestamp."
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The network edge could not supply connection metadata."
          }
        },
        "x-curl-example": "curl -fsS https://techtools.cz/network-info-api/connection"
      }
    },
    "/ping": {
      "get": {
        "operationId": "ping",
        "summary": "Measure elapsed time from your client",
        "responses": {
          "204": {
            "description": "Empty response. curl time_total reports seconds."
          }
        },
        "x-curl-example": "curl -fsS -o /dev/null -w '%{time_total} s\\n' https://techtools.cz/network-info-api/ping"
      }
    },
    "/docs": {
      "get": {
        "operationId": "getDocs",
        "summary": "Read this OpenAPI document",
        "responses": {
          "200": {
            "description": "API reference.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-curl-example": "curl -fsS https://techtools.cz/network-info-api/docs"
      }
    }
  }
}
