get_test_runs
get_test_runs
Retrieves test run results for an AI Agent. Use this to review pass/fail status, evaluation criteria outcomes, and rationale after triggering a test_run via edit_agent_config.
Test runs pinned to a change set are retrieved here too. By default, the tool returns the latest run per test case and change set, including live runs. The results can include several runs for the same test case.
Simulations shows each test case’s latest result across live and change set runs.
Example prompts
- “Show me the latest test run results for each of my test cases.”
- “Which test cases failed in the last run, and why?”
- “Get the full details for test run abc123.”
Parameters
Pagination
Both reads are paged. If the response has a non-null next_cursor, pass it back as cursor to fetch the next page. Repeat until next_cursor is null before you answer a question about the whole set. A pass rate and a count are examples of such a question.
A single run fetched by test_run_id is paged by size. If the run changes between calls, for example because it finishes, the tool rejects the cursor. Call again without cursor to start from the first page. An item too large for one page arrives with its longest text cut and a truncated_fields list that names the cut fields. The full text of those fields is not available through this tool.
Response
When listing, returns test_runs and next_cursor. A page holds up to 100 runs. Each run includes:
- Test run ID, test case ID, and change set ID. Live runs have a
nullchange set ID. - Status, overall pass/fail result, and the failure code when the run failed.
- Per-evaluation-criterion outcomes and rationale.
When requesting a single run by test_run_id, the first page holds the run’s fields. They include its status, test case ID, change set ID, timestamps, and the user who triggered it. Every page returns items, total_count, and next_cursor. Each item has a part, in this order:
criteria_result: the outcome and rationale for one evaluation criterion.custom_metric_result: the result of one custom metric.classification: one classification of the simulated conversation.simulated_call: one API tool call that the simulation answered.conversation: one readable line of the simulated conversation, in itslinefield. The lines are the text the success criteria judge reads. They leave out MCP tool calls, code tool runs, and Playbook steps.transcript: one entry of the simulated conversation transcript that the evaluation was based on.test_case_snapshot: the test case as it was when the run started.