add_rule
Add a conditional response to a route: when the request matches the conditions (query, header, path param, body field), the mock answers with this status, body and latency. Rules are evaluated in order, the first match wins; x-loutre-* headers keep priority.
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": {
"slug": "<slug>",
"route": "<route>",
"when": "<when>"
},
"name": "add_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | JSON body of the response | |
| name | No | Human-readable label of the rule | |
| slug | Yes | Subdomain of the mock, e.g. "brisk-otter" | |
| when | Yes | Every condition must hold | |
| route | Yes | Route identifier, lowercase method: "get:/users/{id}" | |
| status | No | ||
| latencyMs | No | ||
| ownerToken | No | Owner token received at creation (not needed when the account is connected with an API token) |