anthropics / anthropics/claude-code
gitlab mcp problems reading joblog
- Dominant language
- Python
- Stars
- 145k
- Forks
- 23.1k
- PR merge metrics
- PR metrics pending
Description
**Bug Description**
claude mcp failed to read my gitlab ci job log at ` https://gitlabce..com///-/jobs/23365
```
I still can't read it, and it's not for lack of trying — that's a tooling dead end, not a re-read away:
- mcp__gitlabce__get_job_log returns {} for job 23365 (tried both Websites/cityzenz and project id 192, twice each) — and also for the successful job 23367, so it's the trace endpoint on that MCP server, not this job and not auth. The other gitlabce tools (list_pipelines, get_pipeline_jobs) return full data against the same credentials.
```
grok found the issue:
```
What get_job_log actually returns
gitlabce is GitLab’s own MCP (https://gitlabce..com/api/v4/mcp, server 19.3.2). get_job_log is a thin wrapper around GET /projects/:id/jobs/:job_id/trace, which is text/plain, not JSON.
GitLab’s MCP tools normally return both:
┌───────────────────┬───────────────────────────────────┬────────────────────────┐
│ Field │ JSON tools (get_pipeline_jobs, …) │ get_job_log │
├───────────────────┼───────────────────────────────────┼────────────────────────┤
│ content[].text │ JSON dumped as text │ the job log │
├───────────────────┼───────────────────────────────────┼────────────────────────┤
│ structuredContent │ the parsed object │ {} (trace is not JSON) │
└───────────────────┴───────────────────────────────────┴────────────────────────┘
What would actually fix Claude
• GitLab: put the log in structuredContent too, e.g. { "log": "..." }, or omit structuredContent when it is empty so clients fall back to content.
• Claude’s client: if structuredContent is {}, use content instead of treating empty object as “the result”.
Until one of those changes, Claude cannot read job traces on this GitLab, even though the to-ol is working.
**Environment Info**
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.274
- Feedback ID: 2cd5f63f-5d55-43f0-aa5c-81d5f1260720
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing get_job_log for jobs 23365 and 23367 and compare its response with get_pipeline_jobs. Trace how the MCP result exposes content and structuredContent, then determine whether the fix belongs in Claude Code or the GitLab MCP integration. Done means Claude can read the job trace instead of receiving {}.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- gitlab
- Domain
- api, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100