Series Context: Part 7 of 10 in GitLab Core Engineering: Architecture, MCP & CI/CD Deep Dives .
Featured MRs: !264852 , !264853 , !264864 ( All Merged into master )
Designing Tools for LLM Clients Is Different From Writing REST Docs
When a human developer hits 400 Bad Request on a REST API, they open browser docs or curl logs. When an AI agent calls an MCP tool and gets "Validation error: unexpected_argument is invalid" , the model only sees that single string in its next reasoning step.
If an MCP error omits which parameter names are valid—or emits non-standard JSON Schema types—clients fail silently or burn 3–5 round trips guessing. Three recent merged MRs fixed high-leverage friction points across GitLab's MCP stack.
1. Self-Correcting JSONSchemer Validation Errors ( !264853 , Merged)
Look at how Mcp::Tools::Base::BaseService#validate_arguments!…