invarium_manage_scenario
Manage a scenario: update its fields, delete it, or toggle its active state. This tool supports three actions through the action parameter.
When to Use
Call invarium_manage_scenario to modify existing scenarios. Common use cases:
- Update: Rename a scenario, change its description, update expected behavior, or modify tags
- Delete: Remove a scenario that is no longer needed (permanent)
- Toggle: Enable or disable a scenario without deleting it — inactive scenarios are excluded from test runs
Use invarium_list_scenarios first to find the scenario ID you want to manage.
Deletion is permanent. When using action="delete", the scenario and all its test cases are removed and cannot be recovered. The MCP server will ask for explicit confirmation before proceeding.
Parameters
invarium_manage_scenarioManage a scenario: update its fields, delete it, or toggle its active state. For delete, always confirm with the user first -- deletion is permanent.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
scenario_id | string | required | ID of the scenario to manage. Get this from invarium_list_scenarios. |
action | string | required | Operation to perform: update, delete, or toggle. |
name | string | null | default: null | New name for the scenario (update only). |
description | string | null | default: null | New description for the scenario (update only). |
expected_behavior | string | null | default: null | New expected behavior text (update only). |
tags | string | null | default: null | JSON array of tags, e.g. '["auth", "edge-case"]' (update only). |
confirm | boolean | default: false | Required for delete: must be true to confirm permanent deletion. |
Returns
Confirmation string with the action performed and updated fields.
Example
Scenario sc_abc123 updated
Updated fields: name, tagsActions
Update
Update one or more fields on an existing scenario. At least one field must be provided.
Updatable fields:
| Field | Parameter | Description |
|---|---|---|
| Name | name | The scenario title. |
| Description | description | What the scenario tests. |
| Expected behavior | expected_behavior | Description of the expected agent behavior. |
| Tags | tags | JSON array of tag strings. |
Response:
Scenario sc_abc123 updated
Updated fields: name, descriptionDelete
Permanently remove a scenario and all its test cases. This action cannot be undone. Pass confirm=true to proceed.
Response:
Scenario sc_abc123 deletedToggle
Enable or disable a scenario. Inactive scenarios are excluded from test runs but are not deleted. Use this to temporarily disable a scenario without losing it.
Response:
Scenario sc_abc123 is now inactiveor
Scenario sc_abc123 is now activeExamples
Update a Scenario
Rename a scenario and update its tags:
"Rename scenario sc_abc123 to 'Refund policy - digital products' and set its tags to refund, digital, and regression."Update the expected behavior text:
"Update the expected behavior for scenario sc_abc123: the agent should search the knowledge base for refund policy, cite the source article, and clearly state the 14-day refund window for digital products."Delete a Scenario
Remove a scenario permanently:
"Delete scenario sc_abc123. Yes, I confirm."Error Responses
| Error | Cause | Fix |
|---|---|---|
Authentication failed | Invalid or missing API key. | Verify your INVARIUM_API_KEY is set correctly. Run invarium_connect first. |
scenario_id is required and cannot be empty | The scenario_id parameter was not provided or is blank. | Provide the scenario ID. Use invarium_list_scenarios to find it. |
Invalid action 'xyz' | The action parameter is not a recognized value. | Use one of: update, delete, toggle. |
No fields provided to update | action="update" was specified but no fields were provided. | Supply at least one of: name, description, expected_behavior, tags. |
Invalid JSON for tags | The tags string is not valid JSON. | Provide a JSON array, e.g. '["auth", "edge-case"]'. |
tags must be a JSON array | The tags JSON is not an array. | Wrap the tags in a JSON array: '["tag1", "tag2"]'. |
Failed to delete scenario | The scenario does not exist or a server error occurred. | Verify the scenario ID is correct. The scenario may have already been deleted. |
See Error Codes for the full error reference.