debug_last_request
Inspect the most recent captured HTTP request log for a mock endpoint and generate a step-by-step Rule Engine diagnostic trace in Markdown. The trace displays the incoming request's method, path, timestamp, headers, body, final HTTP status code, matched outcome (Rule '' or Fallback), and an ordered evaluation breakdown of every rule configured on the mock (sorted by ascending priority) showing each rule's conditions, join operators, and whether it fired ('[MATCHED]') or was skipped/failed ('[DID NOT MATCH]'). If no request logs exist for the mock yet, returns an informational prompt to send a request via test_mock first. USAGE GUIDELINES: Call debug_last_request immediately when test_mock returns an unexpected status code, when the 'X-Rule-Matched' header is missing or shows the wrong rule, or when diagnosing why an incoming request fell back to the default response. To inspect multiple historical requests rather than just the latest one, use get_request_logs.
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": {
"projectId": "<projectId>",
"mockId": "<mockId>"
},
"name": "debug_last_request"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mockId | Yes | Database ID of the mock API endpoint to diagnose (obtain from list_mocks, search_mocks, or get_mock_detail). | |
| projectId | Yes | Database ID of the project workspace containing the mock (obtain from list_projects, list_mocks, or search_mocks). |