Error Codes
Reference for all error codes returned by the Invarium MCP server.
When an MCP tool call fails, use this reference to understand what went wrong and how to fix it.
Error response format
When an MCP tool call encounters an error, it returns a plain text error message describing the issue. For example:
Error: Agent not found: customer-support-agent. Upload a blueprint first.Error: Blueprint validation failed. Required field 'tools' is missing.The error message includes the cause and typically suggests a fix.
Error codes
AUTH_FAILED
The API key is invalid, expired, or missing.
| Field | Value |
|---|---|
| Tool | All tools |
Common causes:
- The
INVARIUM_API_KEYenvironment variable is not set - The API key has been revoked in the dashboard
- The API key has a typo or is incomplete
- The API key belongs to a different workspace than expected
How to fix:
- Go to the dashboard and navigate to API Keys
- Check if your key is listed and active
- If not, create a new key
- Update your MCP server configuration with the new key:
{
"env": {
"INVARIUM_API_KEY": "inv_your_new_key_here"
}
}- Restart your MCP client to pick up the new configuration
Example error:
Error: Authentication failed. Check your INVARIUM_API_KEY.INVALID_BLUEPRINT
The blueprint YAML is malformed or does not match the required schema.
| Field | Value |
|---|---|
| Tool | invarium_upload_blueprint |
Common causes:
- Invalid YAML syntax (bad indentation, missing quotes around special characters)
- Missing required fields (
agent_name,tools) - Tool definition missing required fields (
name,description,parameters) agent_namecontains invalid characters (only lowercase, numbers, hyphens)- Blueprint size exceeds the 500 KB limit
How to fix:
- Validate your YAML syntax with a linter
- Compare your blueprint against the Blueprint Schema
- See Blueprint Examples for known-good examples
Example error:
Error: Blueprint validation failed. Required field 'tools' is missing.GENERATION_IN_PROGRESS
A test generation is already running for this agent.
| Field | Value |
|---|---|
| Tool | invarium_generate_tests |
Common causes:
- You called
invarium_generate_testswhile a previous generation for the same agent is still running - A generation was started but the client disconnected before receiving the generation ID
How to fix:
- Wait for the current generation to complete (typically 10-30 seconds)
- Use
invarium_get_testswith the agent name to check if results are available - If the previous generation seems stuck (over 2 minutes), wait for the timeout (120 seconds) and try again
You can run generations for different agents concurrently. The limit is one active generation per agent, not per workspace.
AGENT_NOT_FOUND
No agent with the specified name exists in your workspace.
| Field | Value |
|---|---|
| Tool | invarium_generate_tests, invarium_get_tests, invarium_sync_results, invarium_list_scenarios, invarium_create_scenario |
Common causes:
- Typo in the agent name
- The blueprint has not been uploaded yet
- The agent was deleted from the dashboard
- The agent belongs to a different workspace than the API key
How to fix:
- Check the exact agent name — it is case-sensitive and uses kebab-case
- Upload a blueprint first with
invarium_upload_blueprintif the agent does not exist yet - Verify you are using an API key from the correct workspace
Example error:
Error: Agent not found: customer-support-agent. Upload a blueprint first.INVALID_RESULTS
The results payload is malformed or missing required fields.
| Field | Value |
|---|---|
| Tool | invarium_sync_results |
Common causes:
- The
resultsparameter is not a valid JSON array - Individual result objects are missing required fields (
scenario_id,user_message,agent_response) - The
scenario_iddoes not match any generated test case
How to fix:
- Ensure each result has at minimum:
scenario_id,user_message, andagent_response - Validate that
scenario_idvalues match the IDs frominvarium_get_tests - Validate the JSON in your editor or with a linter before syncing
Example error:
Error: Result validation failed. Required field 'agent_response' is missing at index 3.SERVER_ERROR
An unexpected error occurred on the Invarium server.
| Field | Value |
|---|---|
| Tool | All tools |
Common causes:
- Temporary server issue
- An edge case in the Scenario Generator
- Database connectivity issue
How to fix:
- Wait 30 seconds and retry the request
- If the error persists, check Invarium’s status page for outages
- If the issue continues, report it to support@invarium.dev with:
- The full error message
- The tool you were calling
- The parameters you passed (redact any sensitive data)
If you encounter a SERVER_ERROR during test generation, the generation may have partially completed. Check invarium_get_tests before re-generating to avoid duplicate test cases.
QUOTA_EXCEEDED
You have reached your plan’s monthly limit for the requested operation.
| Field | Value |
|---|---|
| Tool | invarium_generate_tests |
Common causes:
- The monthly test generation quota for your plan has been exhausted
- Multiple team members sharing the same workspace consumed the quota
How to fix:
- Run
invarium_usageto see your current quota and remaining allowance - Wait for the quota to reset at the start of the next billing cycle
- Upgrade your plan at app.invarium.dev/settings/billing for a higher quota
Always check your remaining quota with invarium_usage before starting a batch of test generations.
Example error:
Error: Monthly generation quota exceeded. 50/50 generations used. Resets on 2025-08-01.RATE_LIMITED
Too many requests in a short time period.
| Field | Value |
|---|---|
| Tool | All tools |
Common causes:
- Calling the same tool in rapid succession (e.g., polling
invarium_get_testsin a tight loop) - Multiple MCP clients connected to the same workspace making concurrent requests
How to fix:
- Wait a few seconds and retry the request
- When polling for test generation results, wait at least 5-10 seconds between checks
- Avoid making concurrent calls to the same tool from multiple clients
Example error:
Error: Rate limited. Please wait before retrying.VALIDATION_ERROR
A request parameter failed validation.
| Field | Value |
|---|---|
| Tool | All tools |
Common causes:
- A required parameter is missing or empty
- A parameter value is outside the allowed range (e.g.,
page=0,limit=-1) - A string parameter does not match the expected format (e.g., invalid JSON for
expected_toolsortags) - An enum parameter has an unrecognized value (e.g.,
status='unknown',action='reset')
How to fix:
- Check the tool’s parameter documentation for allowed values and formats
- Ensure JSON string parameters (
expected_tools,tags,results) contain valid JSON arrays - Verify enum parameters match one of the documented values exactly
Example errors:
Error: Invalid status 'unknown'. Choose from: failed, flaky, not_run, passed.Error: Invalid JSON for expected_tools: Expecting value. Provide a JSON array, e.g. ["search", "fetch"].Debugging tips
- Read the error message carefully. It contains specific information about what went wrong and typically suggests a fix.
- Use
invarium_connectfirst. If you are gettingAUTH_FAILEDerrors, test the connection before trying other tools. - Validate locally. Before uploading blueprints, validate the YAML in your editor or with a linter. Before syncing results, validate the JSON results payload.