Closed
Description
Summary
The get_job_logs
tool currently returns complete job logs, which can be extremely long and inefficient when used as MCP tool context for LLMs. Adding log truncation options like tail_lines
parameters would help focus on relevant failure information.
Problem
When debugging CI/CD failures using the get_job_logs
tool in LLM conversations:
- Context Overflow: Complete job logs can easily exceed LLM context limits
- Information Overload: Most debugging scenarios only need the final portion where failures occur
- Poor User Experience: Long logs make it harder to identify specific failure points
Proposed Solution
Add optional truncation parameters to the get_job_logs
tool:
tail_lines
: Return last N lines (most useful for failure debugging)
Example usage:
{
"name": "get_job_logs",
"arguments": {
"owner": "example",
"repo": "repo",
"job_id": 12345,
"tail_lines": 100,
"return_content": true
}
}
This enhancement aligns with existing concerns about LLM context efficiency, similar to Issue #142 regarding excessive context size.
Metadata
Metadata
Assignees
Labels
No labels