Repository navigation
Canva MCP: Tool registration fails with schema validation error "enum[0]: cannot be empty" despite successful authentication #33316
Description
Activity
github-actions commented on Jun 22, 2026
This issue might be a duplicate of existing issues. Please check:
- Error resolving schema reference '$ref' in Canva MCP tool when using custom API provider #29220: Error resolving schema reference in Canva MCP tool — same Canva MCP server and the same
perform-editing-operationstool schema causing incompatibility with OpenCode's schema handling - Google provider: schema validation error - numeric values in enum fields #33041: Google provider schema validation error with enum fields — same error pattern (
function_declarations[N]...enum[0]) when using Google/Gemini models with MCP tool schemas - Error GEMA 4 [Google AI Studio] * GeneratedContentRequest #32805: GenerateContentRequest tool schema error with Google provider — same error class affecting Google AI Studio with MCP tool definitions
This issue might be a duplicate of existing issues. Please check:
- Error resolving schema reference '$ref' in Canva MCP tool when using custom API provider #29220: Error resolving schema reference in Canva MCP tool — same Canva MCP server and the same
perform-editing-operationstool schema causing incompatibility with OpenCode's schema handling- Google provider: schema validation error - numeric values in enum fields #33041: Google provider schema validation error with enum fields — same error pattern (
function_declarations[N]...enum[0]) when using Google/Gemini models with MCP tool schemas- Error GEMA 4 [Google AI Studio] * GeneratedContentRequest #32805: GenerateContentRequest tool schema error with Google provider — same error class affecting Google AI Studio with MCP tool definitions
The GitHub bot suggested #29220 and #33041 as possible duplicates.
My issue appears closest to #29220 because it involves:
- Canva MCP (https://mcp.canva.com/mcp)
- Successful authentication
- Failure while registering Canva tool schemas
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.
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
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
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.
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]