diagnose_test_failure
Analyze failing test output and source code to identify root causes, returning ranked hypotheses with confidence scores, evidence, and precise locations.
Instructions
Perform deep root-cause analysis of a failing test. Returns ranked hypotheses with confidence scores, evidence, and precise locations. Call this first when a test fails. Prefer this over guessing from the raw test output.
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": {
"test_output": "<test_output>",
"source_files": "<source_files>"
},
"name": "diagnose_test_failure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| git_diff | No | Optional recent git diff that may have introduced the failure | |
| language | No | Programming language, e.g. typescript, python, go, java | |
| framework | No | Test framework, e.g. jest, vitest, pytest, junit, go test | |
| test_output | Yes | Full test failure output including stack traces, assertion messages, and any relevant logs | |
| source_files | Yes | Relevant source files that may be involved in the failure. Prefer including the test file + the implementation under test. | |
| additional_context | No | Any extra context the agent has about the failure |