Skip to main content
Glama

Job log

get_job_logs
Read-only

Read the job's output log (stdout and stderr together), compact by default so it fits your context: mode=summary (default) returns recognised test results (pytest, go test, Jest, Vitest, cargo, PHPUnit, JUnit, mocha), the error lines with context and the end of the log; mode=errors only the error blocks; mode=tail the end; mode=raw (or an offset) the raw bytes. Works while the job runs and after it ended.

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>"
    },
    "name": "get_job_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNosummary (default), errors, tail or raw.
limitNoraw mode: how many bytes (default 16000, max 60000).
job_idYesJob ID (job_…) returned by run_job.
offsetNoraw mode: byte offset to read from (from next_offset of the previous call); negative = from the end.
max_charsNoSize of the digest in characters for summary/errors/tail (default 6000, 500–100000).

Output Schema

NameRequiredDescriptionDefault
modeYessummary, errors, tail or raw.
sizeYesTotal log size in bytes.
textYesThe log digest (summary/errors/tail) or the raw bytes (raw).
linesNoTotal number of log lines (digest modes).
job_idYesJob ID.
offsetNoraw: byte offset of text.
statusYesJob state.
completeNoraw: the end of the log was reached.
exit_codeNoExit code (after it ended).
next_offsetNoraw: offset to continue from.
test_resultsNoRecognised test results, if any.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, non-destructive and non-open-world, so the safety profile is covered; the description adds real value beyond that by explaining that logs are compacted to fit context and remain readable during and after execution. It does not mention truncation of very old logs or what happens when no test results are recognised, leaving a small gap.

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

Conciseness5/5

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

One dense but well-ordered sentence: cap/purpose first, then each mode in turn, then the key availability constraint. Every clause carries information about a distinct mode, with no filler.

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

Completeness4/5

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

With an output schema present and full schema coverage, the description needs only to cover mode selection and runtime behavior, which it does thoroughly. Minor gaps remain around paging through raw output and degradation when summarisation finds no recognised test results.

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 coverage is 100%, so the baseline is 3, and the description reinforces mode semantics by describing what each enum value returns. It does add that supplying an offset implies raw mode, but it does not distinguish the roles of limit versus max_chars, leaving that entirely to the schema.

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?

States a specific verb+resource ('Read the job's output log') with scope ('stdout and stderr together') and enumerates the four modes so the agent knows exactly what it retrieves. It never names a sibling such as get_job_summary or download_job_artifact, so differentiation is only implied by the word 'log'.

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

Usage Guidelines4/5

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

Clear guidance on when each mode applies (summary for test results/digests, errors for error blocks only, tail for the end, raw/offset for raw bytes) and the key context that it 'Works while the job runs and after it ended'. No explicit exclusions or named alternatives for overlapping tools, which keeps it below 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources