You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slack MCP server request fails with AI_APICallError: tools.11.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,128}$' #3245
Simple prompt like Show me latest 10 messages in Slack #foo channel fails with tools.11.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,128}$'
Claude Desktop can use the same MCP server without any problems.
The error pattern you're seeing (tools.11.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,128}$') suggests that the Slack MCP server is providing tool names that don't conform to OpenCode's tool name validation pattern. This appears to be a broader issue with how OpenCode validates MCP tool names versus how different MCP servers define their tool names.
Feel free to ignore if none of these address your specific case.
Yeah we need to sanitize mcp server tools, this is because whatever provider you are using doesnt accept the format of the mcp server tools it has. So we need to "sanitize" the fields before sending them to specific providers
Activity
github-actions commentedon Oct 17, 2025
This issue might be a duplicate of existing issues. Please check:
The error pattern you're seeing (tools.11.custom.name: String should match pattern '^[a-zA-Z0-9_-]{1,128}$') suggests that the Slack MCP server is providing tool names that don't conform to OpenCode's tool name validation pattern. This appears to be a broader issue with how OpenCode validates MCP tool names versus how different MCP servers define their tool names.
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 17, 2025
Yeah we need to sanitize mcp server tools, this is because whatever provider you are using doesnt accept the format of the mcp server tools it has. So we need to "sanitize" the fields before sending them to specific providers
mgryszko commentedon Oct 17, 2025
@rekram1-node will it be addressed in the next Opencode release?
rekram1-node commentedon Oct 17, 2025
what provider are you using? Anthropic directly?
Lmk which one and i can debug quicker
normally these issues are with google models
mgryszko commentedon Oct 17, 2025
I was using Claude Sonnet 4.5 from GitHub Copilot.
Here is my
opencode.jsonconfig for reference:Claude Desktop configuration (
claude_desktop_config):rekram1-node commentedon Oct 17, 2025
Ahh well if you were using anthropic then it should work, I guess we need special sanitization for copilot then.
I need to familiarize myself with their requirements to see but I dont think this is terribly difficult to add