{
  "name": "http.assert",
  "group": "web",
  "summary": "Verify a URL actually returns what you expected — status, headers, JSON values — and return a pass/fail proof.",
  "description": "The difference between an agent believing it succeeded and knowing it did. http.check tells you a URL is alive; this tells you it is correct. Assert the status, response headers, values at JSONPath expressions, substrings in the body and a latency ceiling, and get back one boolean plus a per-check breakdown showing expected against actual. An agent that has just deployed, migrated or reconfigured something can prove the outcome rather than reporting the absence of an error, which is the usual way agents claim a success they have not actually achieved.",
  "keywords": [
    "assert",
    "verify endpoint",
    "did it work",
    "health check",
    "smoke test",
    "post deploy check",
    "expect status",
    "response validation",
    "prove it",
    "check json response",
    "did my deploy work"
  ],
  "endpoint": "https://fluentedi.com/v1/http/assert",
  "mcp_name": "http_assert",
  "makes_network_request": true,
  "parameters": {
    "type": "object",
    "properties": {
      "url": {
        "description": "URL to call.",
        "type": "string",
        "maxLength": 4000,
        "examples": [
          "https://fluentedi.com/health"
        ]
      },
      "method": {
        "description": "HTTP method.",
        "type": "string",
        "enum": [
          "GET",
          "HEAD",
          "POST",
          "PUT",
          "PATCH",
          "DELETE",
          "OPTIONS"
        ],
        "default": "GET"
      },
      "body": {
        "description": "Request body for POST, PUT and PATCH.",
        "type": "string",
        "default": "",
        "maxLength": 100000
      },
      "headers": {
        "description": "Request headers to send.",
        "type": "object",
        "default": {}
      },
      "expect_status": {
        "description": "Required status: a number, an array of acceptable numbers, or a class such as \"2xx\".",
        "default": ""
      },
      "expect_headers": {
        "description": "Response headers that must exist and contain a substring, e.g. {\"content-type\":\"json\"}.",
        "type": "object",
        "default": {}
      },
      "expect_json": {
        "description": "JSONPath expressions mapped to required values, e.g. {\"$.status\":\"ok\",\"$.items[0].id\":1}.",
        "type": "object",
        "default": {}
      },
      "expect_body_contains": {
        "description": "Substrings that must appear in the body.",
        "type": "array",
        "default": [],
        "items": {
          "type": "string"
        }
      },
      "max_response_ms": {
        "description": "Fail if the response takes longer than this. 0 disables the check.",
        "type": "integer",
        "default": 0,
        "minimum": 0,
        "maximum": 30000
      },
      "timeout_ms": {
        "description": "Request timeout.",
        "type": "integer",
        "default": 10000,
        "minimum": 1000,
        "maximum": 30000
      }
    },
    "required": [
      "url"
    ],
    "additionalProperties": false
  },
  "examples": [
    {
      "description": "Prove a deployment is serving correctly",
      "url": "https://fluentedi.com/v1/http/assert?url=https%3A%2F%2Ffluentedi.com%2Fhealth&expect_status=200&expect_json=%7B%22%24.ok%22%3Atrue%7D&max_response_ms=2000",
      "args": {
        "url": "https://fluentedi.com/health",
        "expect_status": 200,
        "expect_json": {
          "$.ok": true
        },
        "max_response_ms": 2000
      }
    },
    {
      "description": "Check an endpoint returns JSON rather than an error page",
      "url": "https://fluentedi.com/v1/http/assert?url=https%3A%2F%2Ffluentedi.com%2Fv1%2Ftime%2Fnow&expect_status=2xx&expect_headers=%7B%22content-type%22%3A%22json%22%7D&expect_json=%7B%22%24.ok%22%3Atrue%7D",
      "args": {
        "url": "https://fluentedi.com/v1/time/now",
        "expect_status": "2xx",
        "expect_headers": {
          "content-type": "json"
        },
        "expect_json": {
          "$.ok": true
        }
      }
    },
    {
      "description": "Assert a specific value in the response",
      "url": "https://fluentedi.com/v1/http/assert?url=https%3A%2F%2Ffluentedi.com%2Fv1%2Fmath%2Feval%3Fexpression%3D6*7&expect_json=%7B%22%24.result.result%22%3A42%7D",
      "args": {
        "url": "https://fluentedi.com/v1/math/eval?expression=6*7",
        "expect_json": {
          "$.result.result": 42
        }
      }
    }
  ],
  "suggestion": null
}