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 JSON is malformed or does not match the required schema.
| Field | Value |
|---|---|
| Tool | invarium_upload_blueprint |
Common causes:
- Invalid JSON syntax (missing commas, unclosed brackets)
- 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 JSON 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 |
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.ai 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.
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 JSON locally. Before uploading blueprints or syncing results, validate the JSON in your editor or with a linter.