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-chec...
This record as markdown: /tools/com-fluentedi-tools/http-assert.md
What http_assert does on Tools
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to call. |
body | string | — | Request body for POST, PUT and PATCH. |
method | string | — | HTTP method. |
headers | object | — | Request headers to send. |
timeout_ms | integer | — | Request timeout. |
expect_json | object | — | JSONPath expressions mapped to required values, e.g. {"$.status":"ok","$.items[0].id":1}. |
expect_status | object | — | Required status: a number, an array of acceptable numbers, or a class such as "2xx". |
expect_headers | object | — | Response headers that must exist and contain a substring, e.g. {"content-type":"json"}. |
max_response_ms | integer | — | Fail if the response takes longer than this. 0 disables the check. |
expect_body_contains | array | — | Substrings that must appear in the body. |
Parameters from the server's own tool schema.
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 signalsAccepts URL/endpoint input (url) · Accepts raw HTML/template content (body) · High parameter count (10 properties)
Attacks that exploit this kind of access
The rule that runs http_assert safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Tools, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For http_assert, this is the rule to start with:
http_assert is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Tools, apply this rule, and every http_assert call is checked against it from then on.
Questions about 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. It is categorised as a Read tool in the Tools MCP Server, which means it retrieves data without modifying state.
http_assert accepts 10 parameters: url, body, method, headers, timeout_ms, expect_json, expect_status, expect_headers, max_response_ms, expect_body_contains. Required: url. The full parameter table on this page comes from the server's own tool schema.
Register the Tools MCP server in PolicyLayer and add a rule for http_assert: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Tools. Nothing to install.
http_assert is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the http_assert rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for http_assert. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
http_assert is provided by the Tools MCP server (https://fluentedi.com/mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Tools, and thousands of servers like it.
This server
Across the catalogue