mock_response
Return a mocked response for every request matching a Unix glob URL pattern, with custom status, headers, and body.
Instructions
Return a mocked response for every request matching url_pattern.
``url_pattern`` uses Unix glob syntax (``*``, ``?``), matched against
the full request URL. ``body`` is UTF-8 text (cap: 10 MiB to prevent
RAM exhaustion). Returns a rule id; pass it to
``stop_interception(rule_id)`` or call with no args to clear all.
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": {
"url_pattern": "<url_pattern>"
},
"name": "mock_response"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| status | No | ||
| headers | No | ||
| url_pattern | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |