MCP Referenceinvarium_manage_scenario

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_scenario

Manage a scenario: update its fields, delete it, or toggle its active state. For delete, always confirm with the user first -- deletion is permanent.

Parameters

NameTypeRequiredDescription
scenario_idstringrequiredID of the scenario to manage. Get this from invarium_list_scenarios.
actionstringrequiredOperation to perform: update, delete, or toggle.
namestring | nulldefault: nullNew name for the scenario (update only).
descriptionstring | nulldefault: nullNew description for the scenario (update only).
expected_behaviorstring | nulldefault: nullNew expected behavior text (update only).
tagsstring | nulldefault: nullJSON array of tags, e.g. '["auth", "edge-case"]' (update only).
confirmbooleandefault: falseRequired 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, tags

Actions

Update

Update one or more fields on an existing scenario. At least one field must be provided.

Updatable fields:

FieldParameterDescription
NamenameThe scenario title.
DescriptiondescriptionWhat the scenario tests.
Expected behaviorexpected_behaviorDescription of the expected agent behavior.
TagstagsJSON array of tag strings.

Response:

Scenario sc_abc123 updated
Updated fields: name, description

Delete

Permanently remove a scenario and all its test cases. This action cannot be undone. Pass confirm=true to proceed.

Response:

Scenario sc_abc123 deleted

Toggle

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 inactive

or

Scenario sc_abc123 is now active

Examples

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

ErrorCauseFix
Authentication failedInvalid or missing API key.Verify your INVARIUM_API_KEY is set correctly. Run invarium_connect first.
scenario_id is required and cannot be emptyThe 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 updateaction="update" was specified but no fields were provided.Supply at least one of: name, description, expected_behavior, tags.
Invalid JSON for tagsThe tags string is not valid JSON.Provide a JSON array, e.g. '["auth", "edge-case"]'.
tags must be a JSON arrayThe tags JSON is not an array.Wrap the tags in a JSON array: '["tag1", "tag2"]'.
Failed to delete scenarioThe 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.

Was this page helpful?