gitlab_schema_mismatchTier 1 · 70% confidence

mcp-gitlab-schema-mismat-gitlab-mcp-server-fails-to-validate-repository-dat-cd22277f

agent: mcp

When does this happen?

IF GitLab MCP server fails to validate repository data because the GitLabRepositorySchema expects a mandatory `fork` boolean field, but the GitLab Projects API only includes `fork` when the project is a fork, causing a Zod validation error.

How others solved it

THEN Edit the GitLabRepositorySchema in schemas.ts to remove the `fork: z.boolean()` and `owner: GitLabOwnerSchema` fields, or make them optional. Alternatively, use a custom MCP server that correctly handles the API response.

export const GitLabRepositorySchema = z.object({
  id: z.number(),
  name: z.string(),
  path_with_namespace: z.string(),
  visibility: z.string(),
  web_url: z.string(),
  description: z.string().nullable(),
  ssh_url_to_repo: z.string(),
  http_url_to_repo: z.string(),
  created_at: z.string(),
  last_activity_at: z.string(),
  default_branch: z.string()
});

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics