api_assert
Send HTTP requests and validate responses by asserting status codes, expected fields, or body substrings, with a clear pass/fail report for failed checks.
Instructions
Send a request and assert on it: expectStatus (exact status code), expectFields (dot-path -> expected value, e.g. {"data.total": 10}), expectBodyContains (substring match on raw response text). Returns a clear pass/fail report; failures are also recorded and retrievable via api_errors.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"method": "<method>",
"url": "<url>"
},
"name": "api_assert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| body | No | ||
| name | No | Label for this check, shown in the report | |
| query | No | ||
| method | Yes | ||
| headers | No | ||
| timeout | No | ||
| expectFields | No | ||
| expectStatus | No | ||
| expectBodyContains | No |