Skip to main content
The MCP tools provide detailed error messages designed to help AI agents understand and correct issues.

Project Context Errors

NO_PROJECT_CONTEXT

Returned when no project context is set and no projectId parameter is provided.
Recovery: Call set_project with a valid project ID, or include projectId in the tool call.

PROJECT_ACCESS_DENIED

Returned when the user doesn’t have access to the specified project.
Recovery: Use list_projects to find projects you have access to.

Content Validation Errors

The create_content and update_content tools validate all content against the content type’s JSON schema.

VALIDATION_ERROR

General validation failure with detailed error information.

SCHEMA_STRUCTURE_ERROR

Using components or fields not allowed by the content type.
Recovery: Check the content type schema for allowed component types.

REQUIRED_FIELD_ERROR

Missing mandatory fields.
Recovery: Add all required fields as specified in the schema.

TYPE_MISMATCH_ERROR

Incorrect data types.
Recovery: Convert the value to the expected type.

CONSTRAINT_VIOLATION

Exceeding limits or breaking rules.
Recovery: Adjust the value to meet the constraint.

ASSET_NOT_FOUND

Referencing non-existent assets.
Recovery: Use search_assets to find valid asset IDs.

MULTIPLE_VALIDATION_ERRORS

Multiple errors grouped and summarized.

Recovery Strategies

When encountering validation errors:
  1. Parse the suggestion field: Every error includes actionable guidance
  2. Review the schema: Use get_content_type to understand requirements
  3. Fix asset issues: Use search_assets to find valid asset IDs
  4. Handle length constraints: Split long content into multiple components
  5. Check component types: Ensure using only allowed component types

Error Prevention Best Practices

1

Fetch the schema first

Always use get_content_type before creating content to understand the structure and constraints.
2

Validate asset IDs

Use search_assets to verify assets exist before referencing them.
3

Check length limits

Review maxLength constraints in the schema for all text fields.
4

Use correct component types

Match component type names exactly as defined in the schema’s definitions.
5

Include all required fields

Check the schema’s required arrays at each level of the structure.