Get Failed Job Logs Tool
get_failed_job_logs_toolExtracts failure summaries from failed GitHub Actions jobs, showing log-tail cause lines and failed step names to diagnose CI failures quickly.
Instructions
Get the failure summary of each failed job in a GitHub Actions run.
Returns, for every job that failed or timed out, a failure_summary: the
log-tail lines that name the cause (error annotations, test failures,
tracebacks, non-zero exits), with ANSI escapes and timestamps removed, plus
the names of the steps that failed. Set include_raw_log to also get the
full cleaned tail as log — it can be large and, for a repository whose
CI output quotes attack corpora, a scanning gateway may flag and withhold
it, where the small, signal-only summary is far more likely to pass.
Logs are fetched for at most 5 failed jobs and all log text together is
capped at 256 KiB; truncated and failed_jobs_omitted say when
something was cut. jobs_truncated means the run has more than the 300
jobs examined, so the failed-job counts cover only those.
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": {
"repo": "<repo>",
"run_id": "<run_id>"
},
"name": "get_failed_job_logs_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name | |
| owner | No | Repository owner (defaults to GITHUB_DEFAULT_ORG if unset) | |
| run_id | Yes | Workflow run ID | |
| tail_lines | No | Lines of the tail to scan for the summary, and to return as ``log`` when ``include_raw_log`` is set (default 200, max 1000) | |
| include_raw_log | No | Also return the full cleaned tail as ``log`` (default False); the raw tail may be withheld by a scanning gateway, the summary is not |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||