Enhancement: Add log truncation options to `get_job_logs` tool for improved LLM context efficiency · Issue #608 · github/github-mcp-server · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Enhancement: Add log truncation options to get_job_logs tool for improved LLM context efficiency #608

Closed
@kehao95

Description

@kehao95

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:

  1. Context Overflow: Complete job logs can easily exceed LLM context limits
  2. Information Overload: Most debugging scenarios only need the final portion where failures occur
  3. 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
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    TMZ Celebrity News – Breaking Stories, Videos & Gossip

    Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

    Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

    🎥 Watch TMZ Live

    TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.