# http_assert

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.

Agent View of the PolicyLayer registry record for `http_assert`. HTML page: https://policylayer.com/tools/com-fluentedi-tools/http-assert

## Facts

- Tool: `http_assert`
- Server: Tools (`https://fluentedi.com/mcp`) — https://policylayer.com/tools/com-fluentedi-tools.md
- Homepage: https://github.com/https://fluentedi.com/mcp
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server auth posture: open
- Server CORS policy: *
- Server rate-limited: no
- Parameters: 10 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | URL to call. |
| `body` | string | no | Request body for POST, PUT and PATCH. |
| `method` | string | no | HTTP method. |
| `headers` | object | no | Request headers to send. |
| `timeout_ms` | integer | no | Request timeout. |
| `expect_json` | object | no | JSONPath expressions mapped to required values, e.g. {"$.status":"ok","$.items[0].id":1}. |
| `expect_status` | object | no | Required status: a number, an array of acceptable numbers, or a class such as "2xx". |
| `expect_headers` | object | no | Response headers that must exist and contain a substring, e.g. {"content-type":"json"}. |
| `max_response_ms` | integer | no | Fail if the response takes longer than this. 0 disables the check. |
| `expect_body_contains` | array | no | Substrings that must appear in the body. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "http_assert",
    "arguments": {
      "url": "<url>"
    }
  }
}
```

## Why http_assert is rated Low

Even though http_assert only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.

Risk signals: Accepts URL/endpoint input (url) · Accepts raw HTML/template content (body) · High parameter count (10 properties)

## Use case

AI agents call http_assert to retrieve information from Tools without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Tools:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "http_assert": {}
  }
}
```

## Other tools on Tools (16)

- `cron_next` — Execute — https://policylayer.com/tools/com-fluentedi-tools/cron-next.md
- `edi_build` — Execute — https://policylayer.com/tools/com-fluentedi-tools/edi-build.md
- `edi_parse` — Execute — https://policylayer.com/tools/com-fluentedi-tools/edi-parse.md
- `edi_validate` — Read — https://policylayer.com/tools/com-fluentedi-tools/edi-validate.md
- `hash` — Read — https://policylayer.com/tools/com-fluentedi-tools/hash.md
- `http_check` — Read — https://policylayer.com/tools/com-fluentedi-tools/http-check.md
- `json_query` — Read — https://policylayer.com/tools/com-fluentedi-tools/json-query.md
- `json_repair` — Read — https://policylayer.com/tools/com-fluentedi-tools/json-repair.md
- `math_eval` — Read — https://policylayer.com/tools/com-fluentedi-tools/math-eval.md
- `time_diff` — Read — https://policylayer.com/tools/com-fluentedi-tools/time-diff.md
- `time_now` — Read — https://policylayer.com/tools/com-fluentedi-tools/time-now.md
- `time_window` — Read — https://policylayer.com/tools/com-fluentedi-tools/time-window.md
- `tool_describe` — Read — https://policylayer.com/tools/com-fluentedi-tools/tool-describe.md
- `tool_search` — Read — https://policylayer.com/tools/com-fluentedi-tools/tool-search.md
- `time_convert` — Write — https://policylayer.com/tools/com-fluentedi-tools/time-convert.md
- `tool_call` — Write — https://policylayer.com/tools/com-fluentedi-tools/tool-call.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=com-fluentedi-tools · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/com-fluentedi-tools
