-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature or problem you’d like to solve
Currently, the GitHub MCP Server exposes the following tools for working with workflow runs and jobs:
mcp0_list_workflow_runs
mcp0_list_workflow_jobs
mcp0_get_job_logs
To fetch logs for a particular job, an agent must:
- Call
mcp0_list_workflow_runs
to find the relevant run. - Call
mcp0_list_workflow_jobs
with therun_id
. - Iterate through hundreds or even thousands of jobs to locate a job by its
name
. - Call
mcp0_get_job_logs
with thejob_id
.
This approach works for small workflows but becomes inefficient and impractical for large workflows (e.g. 1,000+ jobs). Agents often struggle to handle such large responses, and passing the entire job list into context is wasteful.
Proposed solution
Introduce a new tool such as:
mcp0_get_job_logs_by_name
- Inputs:
run_id
,job_name
- Behavior: Server internally paginates jobs for the given run, finds the job with the given name, and returns its logs.
- Inputs:
Alternatively:
mcp0_get_job_by_name
- Inputs:
run_id
,job_name
- Behavior: Server returns the
job_id
only, which can then be passed to the existingmcp0_get_job_logs
.
- Inputs:
Benefits:
- Efficient for large workflows with hundreds/thousands of jobs.
- Reduces token/context overhead for AI agents.
- Keeps API usage minimal (avoids unnecessary job list retrieval).
- Provides a clearer and more direct developer experience.
Example prompts or workflows (for tools/toolsets only)
- Fetch logs from a specific job in the latest successful run
{ "tool": "mcp0_get_job_logs_by_name", "arguments": { "run_id": 678901234, "job_name": "integration-tests" } }
- Get job ID by name
{
"tool": "mcp0_get_job_by_name",
"arguments": {
"run_id": 678901234,
"job_name": "build-backend"
}
}
Simplify common workflow automation
- “Fetch the logs for the
lint
job in the most recent successful run ofci.yml
” - “Retrieve job IDs for all
deploy-*
jobs in a workflow run.”
Additional context
- Large enterprise workflows often include hundreds or thousands of jobs. Without server-side filtering by job name, AI agents or clients must inefficiently fetch and parse the entire list.
- Adding a server-side helper tool would significantly improve scalability and usability.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request