run_testrail_command
Execute any TestRail API method to manage test projects, cases, runs, and results, with support for parameters, filters, field selection, and result truncation.
Instructions
Execute a TestRail API method.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | The API category (e.g. "projects", "cases", "runs"). | |
| method | Yes | The method name (e.g. "get_projects", "add_case"). | |
| params | No | Optional dict of parameters to pass to the method. | |
| extra_params | No | Optional dict of additional query parameters that are appended to the API request URL. Use this for filters not directly supported by the method signature, such as custom field filters (e.g. ``{"custom_automation_type": "1"}``). These are merged into the URL query string alongside the method's own parameters. | |
| fields | No | Optional list of field names to include in each result item. When provided and the response is a list of dicts, each dict is filtered to only contain the specified keys. Useful for reducing response size (e.g. ``fields=["id", "title"]``). | |
| max_results | No | Optional maximum number of items to return. When provided and the response is a list longer than this value, the list is truncated and the return value becomes a dict with ``results`` (the truncated list), ``truncated`` (True), ``total_count`` (original length), and a human-readable ``message``. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |