mock_network
Intercept network requests matching a URL pattern and return custom responses to isolate frontend testing of API calls.
Instructions
[Agent Browser] Mock network requests matching a URL pattern. Use for frontend isolation testing by intercepting and mocking API calls. Pattern uses glob matching (e.g., '**/api/users*'). Response body is returned as-is.
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>",
"response_body": "<response_body>"
},
"name": "mock_network"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | ||
| url_pattern | Yes | ||
| content_type | No | application/json | |
| response_body | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| hints | No | ||
| message | No | ||
| success | No | ||
| suggestions | No |