Skip to main content
Glama

gitlab_get_job_artifact

Read-onlyIdempotent

Read a specific UTF-8 text file from a GitLab CI/CD job artifact archive with a byte limit to prevent oversized responses.

Instructions

Read one UTF-8 text file from a job archive with a bounded response.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "job_id": "<job_id>",
      "artifact_path": "<artifact_path>",
      "project_path": "<project_path>"
    },
    "name": "gitlab_get_job_artifact"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesPositive numeric GitLab job ID.
max_bytesNoMaximum UTF-8 response bytes (1–2,000,000).
project_pathYesGitLab project path (e.g. 'my-org/my-repo'). Required by default. For legacy deployments only, set GITLAB_ALLOW_DEFAULT_PROJECT=true to use GITLAB_PROJECT_PATH when omitted.
artifact_pathYesSafe relative file path inside the job artifacts archive.

Output Schema

NameRequiredDescriptionDefault
sizeYes
job_idYes
statusYes
contentYes
messageYes
projectYes
truncatedYes
content_typeYes
artifact_pathYes
bytes_returnedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.7

TDQS

B3.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover read-only, idempotent, non-destructive, open-world. The description adds that only UTF-8 text files are supported (binary artifacts will not work) and that the response is bounded, which are real behavioral traits beyond the annotations. It does not say what happens when the file exceeds max_bytes (truncation vs error).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One short, front-loaded sentence with no wasted words. It is arguably too terse given the tool's constraints, but nothing is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return values needn't be explained. However, for a file-reader constrained to UTF-8 text with a size cap, the description omits the important behavior on oversized or binary files (truncation? error?) and that the artifact path must exist in the archive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so parameter semantics are already fully documented (including the max_bytes range and the legacy default-project behavior). The description mentions 'bounded response' but adds no detail beyond the schema baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb+resource: 'Read one UTF-8 text file from a job archive' — clearly distinct from gitlab_list_job_artifacts and gitlab_get_job_log. It does not explicitly name siblings, but the resource (single file inside a job archive) is specific enough for selection.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use/when-not guidance and no mention of alternatives such as gitlab_list_job_artifacts for discovering paths or gitlab_get_job_log for logs. 'bounded response' hints at the max_bytes purpose but doesn't explain when to adjust it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.