MCP Referenceinvarium_list_scenarios

invarium_list_scenarios

List test scenarios for an agent. Shows each scenario’s title, ID, status, complexity, and test case count.

When to Use

Call invarium_list_scenarios to browse the scenarios registered for an agent. Common use cases:

  • Reviewing which scenarios exist before generating new ones
  • Filtering by status to find failing or flaky scenarios that need attention
  • Paginating through a large scenario set

See Test Scenarios for background on how scenarios are structured.

Parameters

invarium_list_scenarios

List test scenarios for an agent. Shows each scenario's title, ID, status, complexity, and test case count. Supports filtering by status and active state with pagination.

Parameters

NameTypeRequiredDescription
agent_namestringrequiredName of the agent whose scenarios to list.
statusstring | nulldefault: nullFilter by status: passed, failed, flaky, or not_run. Omit to show all statuses.
activeboolean | nulldefault: nullFilter by active state. true returns only active scenarios, false returns only inactive. Omit to show all.
pageintdefault: 1Page number for pagination. Must be >= 1.
limitintdefault: 20Number of scenarios per page. Must be >= 1.

Returns

Formatted list of scenarios with status, title, ID, complexity, and test case count. Includes pagination info.

Example

Scenarios for 'customer-support-agent' (12 total, page 1/1):

1. [PASSED] Happy path - product search
   ID: sc_abc123 | Complexity: simple | Test cases: 5

2. [FAILED] Edge case - empty cart checkout
   ID: sc_def456 | Complexity: edge_case | Test cases: 3

3. [NOT_RUN] Guardrail test - PII handling
   ID: sc_ghi789 | Complexity: complex | Test cases: 4

Response

The tool returns a formatted text list with pagination information:

Scenarios for 'customer-support-agent' (12 total, page 1/1):

1. [PASSED] Happy path - product search
   ID: sc_abc123 | Complexity: simple | Test cases: 5

2. [FAILED] Edge case - empty cart checkout
   ID: sc_def456 | Complexity: edge_case | Test cases: 3

3. [NOT_RUN] Guardrail test - PII handling
   ID: sc_ghi789 | Complexity: complex | Test cases: 4

Response Fields

Each scenario entry includes:

FieldDescription
StatusCurrent test status: PASSED, FAILED, FLAKY, or NOT_RUN. Shown in brackets.
TitleThe scenario name or title.
IDUnique scenario identifier. Use this with invarium_manage_scenario.
ComplexityScenario difficulty level: simple, moderate, complex, mixed, or edge_case.
Test casesNumber of test cases within the scenario.

Status Values

StatusMeaning
PASSEDAll test cases in the scenario passed on the last run.
FAILEDOne or more test cases failed on the last run.
FLAKYThe scenario has inconsistent results across recent runs.
NOT_RUNThe scenario has not been executed yet.

Examples

List All Scenarios

"List all scenarios for my customer-support-agent."

Filter by Failing Status

Show only scenarios that failed on their last run:

"Show me the failing scenarios for my customer-support-agent."

Paginate Through Results

For agents with many scenarios, use page and limit to paginate:

"List scenarios for my customer-support-agent, page 2, 10 per page."

Error Responses

ErrorCauseFix
Authentication failedInvalid or missing API key.Verify your INVARIUM_API_KEY is set correctly. Run invarium_connect first.
Agent 'xyz' not foundNo agent with this name exists in your workspace.Check the agent name spelling. Use invarium_list_agents to see available agents.
Invalid status 'xyz'The status parameter is not a recognized value.Use one of: passed, failed, flaky, not_run.
Invalid page: must be a positive integerThe page parameter is less than 1 or not an integer.Use a positive integer for page.
Invalid limit: must be a positive integerThe limit parameter is less than 1 or not an integer.Use a positive integer for limit.
No scenarios found for 'xyz'The agent has no scenarios matching the filters.Generate scenarios first with invarium_generate_tests, or broaden your filters.

See Error Codes for the full error reference.

Was this page helpful?