get_cases
Retrieve all test cases for a TestRail project, filtering by section, priority, type, or custom fields. Returns case IDs, titles, and requested fields.
Instructions
Get all test cases for a project. Filter by section, API params (priority, type), or any field including custom fields via 'where'. Returns case IDs, titles, and any additional requested fields.
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": {
"project_id": "<project_id>"
},
"name": "get_cases"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | Optional client-side filter for any field including custom fields (filters after fetching all cases). Supports exact value matching. Example: {"custom_automation_status": 1, "priority_id": 2} | |
| fields | No | Additional fields to include in response beyond id, title, and suite_id (supports system fields such as updated_on, created_on, created_by, updated_by, as well as custom fields). Example: ["updated_on", "priority_id", "custom_automation_status"] | |
| filter | No | Optional API-side filters (more efficient for large datasets). Supported: priority_id, type_id, created_by, updated_by, milestone_id, refs, created_after, created_before, updated_after, updated_before. Use comma-separated values for IDs. Example: {"priority_id": "1,2", "type_id": "3"} | |
| section | No | Section filter configuration. Use query_section to find available sections | |
| suite_id | No | The ID of the test suite (required for multi-suite projects, i.e. suite_mode=3). Use query_suite to find available suites | |
| project_id | Yes | The ID of the project. Use query_project to find available projects | |
| output_file | No | Absolute file path to save the JSON response to. Use this for large datasets to avoid blowing up context limits. |