-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Problem
When using the GitLab MCP server through the Docker MCP Gateway, the create_issue tool returns a validation error when the labels parameter is provided, even though the issue is successfully created on GitLab with the
labels correctly applied.
Error message:
Failed to execute tool: calling "tools/call": Invalid arguments: labels.0: Expected object, received string, labels.1: Expected object, received string
Impact
This false error causes duplicate issues to be created when AI agents retry after receiving the error:
- First call with labels → Issue created successfully BUT returns validation error
- Agent sees error and retries without labels → Second duplicate issue created
- Result: Two issues created 5-10 seconds apart (one with labels, one without)
Steps to Reproduce
- Configure Docker MCP Gateway with GitLab server
- Call
create_issuewith labels parameter:{ "project_id": "root/test-repo", "title": "Test Issue", "description": "Test description", "labels": ["bug", "enhancement"] } - Observe validation error is returned
- Check GitLab - issue was created successfully with labels
Expected Behavior
• Issue should be created (✅ works)
• Labels should be applied (✅ works)
• Tool should return success, not validation error (❌ fails)
Current Behavior
• Issue is created ✅
• Labels are applied ✅
• Tool returns false validation error ❌
• This misleads AI agents into retrying and creating duplicates
Root Cause
The MCP gateway appears to be validating the response (or echoing back request parameters) incorrectly. The labels format ["bug", "test"] is correct for the GitLab API and works perfectly, but the gateway's parameter
validation fails after the successful API call.
Environment
• Docker MCP Gateway version: latest (as of Nov 1, 2025)
• GitLab version: Community Edition
• OpenCode.ai integration via ~/.config/opencode/opencode.jsonc
Workaround
AI agents can work around this by:
- Always including labels in the correct string array format
- Ignoring the validation error
- Never retrying after getting the error (trust it succeeded)
Suggested Fix
The gateway should either:
- Fix the validation to accept string arrays for labels, OR
- Remove the validation check after successful API response, OR
- Document the expected label format if it differs from GitLab API