Skip to main content
Glama

Tail job logs

cron_tail_job_logs
Read-onlyIdempotent

Read the latest stdout/stderr lines from a job's current or last run and poll with a cursor to fetch newly appended output.

Instructions

Last retained stdout/stderr lines of a job's newest running instance, or of its last finished run when none is running, with a cursor to poll for newly appended lines (the poll form of the live log stream). Use it to read what a job printed; use cron_list_runs for exit status and timing.

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

Input Schema

NameRequiredDescriptionDefault
nameYesExact job name, as cron_list_jobs returns it. An unknown name returns an error.
tailNoMost lines to return, newest last (default and maximum 200).
cursorNoOmit it for the latest lines. To poll, pass the previous result's cursor to get up to tail lines after it, and call again while pages come back full. In the result, skipped counts lines after the cursor that the 1000-line buffer dropped. reset means the cursor is past this run's output: it came from another run, or the run's lines are gone (an ended workflow task, or a run from before a daemon restart). If started_at changed, the lines come from another run, so call again without a cursor.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.2.73
    • addedInput schema / properties / cursor / description
      Added value: +"Omit it for the latest lines. To poll, pass the previous result's cursor to get up to tail lines after it, and call again while pages come back full. In the result, skipped counts lines after the cursor that the 1000-line buffer dropped. reset means the cursor is past this run's output: it came from another run, or the run's lines are gone (an ended workflow task, or a run from before a daemon restart). If started_at changed, the lines come from another run, so call again without a cursor."
    • addedInput schema / properties / cursor / minimum
      Added value: +0
    • addedInput schema / properties / name / description
      Added value: +"Exact job name, as cron_list_jobs returns it. An unknown name returns an error."
    • addedInput schema / properties / tail / default
      Added value: +200
    • addedInput schema / properties / tail / description
      Added value: +"Most lines to return, newest last (default and maximum 200)."
    • addedInput schema / properties / tail / maximum
      Added value: +200
    • addedInput schema / properties / tail / minimum
      Added value: +1
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, so the description wisely spends its words on retention and source-selection semantics: lines are 'retained' (not complete history), from the newest running instance or the last finished run, and cursor-based polling is how you follow appends. It doesn't mention the 1000-line drop buffer or reset/skipped semantics that live only in the schema, so it stops short of the richest disclosure.

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?

A single sentence with the core resource front-loaded and no filler. It is tightly packed with nested parentheticals and clause chains, which slightly taxes parsing but nothing is wasted.

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 no output schema, the description still conveys the shape of the response (lines plus a cursor, tied to a specific run) and the run-selection rule. The buffer-drop and reset edge cases are documented in the schema rather than the description, which is acceptable but leaves the description slightly thin for a polling tool.

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% and the schema's cursor description is notably richer (pagination loop, skipped, reset, started_at change) than the description's brief 'a `cursor` to poll for newly appended lines'. With the schema carrying that load, baseline 3 is right; the description adds no syntax or format detail beyond it.

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

Purpose5/5

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

States a specific resource (last retained stdout/stderr lines) with precise scope: newest running instance, falling back to last finished run. That scope rule alone distinguishes it from every sibling that reports status or timing.

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

Usage Guidelines5/5

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

Explicitly routes between this tool ('read what a job printed') and cron_list_runs ('exit status and timing'), and states that this is the poll form of the live log stream. An agent can pick correctly without opening either schema.

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