Skip to content

Canva MCP: Tool registration fails with schema validation error "enum[0]: cannot be empty" despite successful authentication #33316

Description

@elliptronshop-hash

Canva MCP tools fail to load with schema validation error (enum[0]: cannot be empty)
Environment
OpenCode Version: 1.17.9
OS: Windows 11
Canva MCP: https://mcp.canva.com/mcp
MCP Status: Connected and authenticated
Models tested:
Gemma 4 31B IT
Gemini 2.5 Flash
Result: Same error across models
Description

The Canva MCP server successfully connects and authenticates, but any attempt to use Canva tools causes tool registration to fail before execution.

The error appears to occur while OpenCode/provider tooling is processing Canva MCP tool schemas.

Reproduction Steps
Configure Canva MCP:
{
"mcp": {
"canva": {
"type": "remote",
"url": "https://mcp.canva.com/mcp"
}
}
}
Authenticate:
opencode mcp auth canva
Verify connection:
opencode mcp list

Output:

✓ canva connected
https://mcp.canva.com/mcp
Ask OpenCode:
Create a Canva presentation about climate change with 5 slides.
Actual Result
GenerateContentRequest.tools[0].function_declarations[25].parameters.properties[operations].items.any_of[8].properties[formatting].properties[link].any_of[0].enum[0]: cannot be empty

No Canva tool is executed.

Expected Result

Canva MCP tools should load successfully and the design should be created.

Additional Information

opencode mcp debug canva reports:

Auth status: ✓ authenticated
Access token: present
Refresh token: present
Connection successful (already authenticated)

The issue persists after upgrading from OpenCode 1.15.13 to 1.17.9.

Because authentication succeeds and the same schema error occurs across multiple models, this appears to be either:

A Canva MCP tool schema incompatibility, or
An OpenCode MCP schema translation/validation issue.

The failing schema path appears to be:

function_declarations[25]
.parameters.properties[operations]
.items.any_of[8]
.properties[formatting]
.properties[link]
.any_of[0]
.enum[0]

Activity

github-actions commented on Jun 22, 2026

@github-actions
Contributor

This issue might be a duplicate of existing issues. Please check:

elliptronshop-hash commented on Jun 22, 2026

@elliptronshop-hash
Author

This issue might be a duplicate of existing issues. Please check:

The GitHub bot suggested #29220 and #33041 as possible duplicates.

My issue appears closest to #29220 because it involves:

The failing path is:

function_declarations[25]
.parameters.properties[operations]
.items.any_of[8]
.properties[formatting]
.properties[link]
.any_of[0]
.enum[0]

I'm also seeing the issue across multiple models/providers after upgrading to OpenCode 1.17.9.

elliptronshop-hash commented on Jun 22, 2026

@elliptronshop-hash
Author

I upgraded to OpenCode 1.17.9 and can still reproduce.

Canva MCP is connected and authenticated.

The error path points to:
function_declarations[25]
.parameters.properties[operations]
.items.any_of[8]
.properties[formatting]
.properties[link]

This appears related to the perform-editing-operations Canva tool mentioned in #29220.

github-actions commented on Aug 22, 2026

@github-actions
Contributor

To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

dotCipher commented on Sep 1, 2026

@dotCipher

Reopening — this got auto-closed for staleness, not because it was fixed.

The failing path here (operations.items.any_of[8].properties[formatting].properties[link].any_of[0].enum[0]) is the same bug class as #46676: Gemini rejects a "" enum member wherever it appears in a tool schema, including nested inside anyOf. It looked Canva/$ref-specific because of where it showed up in the schema tree, but the actual fix is in opencode's Gemini tool-schema sanitizer, not the Canva server. #46676 strips empty-string enum members there and should fix this too.

Linking as the tracking issue for that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions