get_test_cases
get_test_cases
Retrieves test cases configured for an AI Agent. Supports listing all test cases, filtering by name, retrieving full details for a single test case, and sorting by last run.
Example prompts
- “Show me all test cases on our Agent.”
- “Find test cases whose name mentions ‘refund’.”
- “Which test cases have not run recently?”
Parameters
Pagination
A list of test cases is paged by size. 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.
If a test case is created or deleted between calls, the tool rejects the cursor. When group_by_last_run is true, a run that finishes between calls also rejects it. Call again without cursor to start from the first page.
A test case too large for one page arrives with its longest text cut and a truncated_fields list that names the cut fields. To read the full definition, request the case by test_case_id. Do not reuse a case that has truncated_fields.
Response
When listing, each page returns test_cases, total_count, and next_cursor. Each test case includes:
- ID and name.
- Channel ID and language.
- User message or scenario.
- Success criteria.
- Variables.
- Created and last-updated timestamps, with the users who made them.
last_run_at, whengroup_by_last_runistrue. The value isnullfor a case that never ran.
When requesting a single test case by ID, the full test case definition is returned in one response, without paging.