Skip to content

Failed to execute GitHub MCP tool #156

@tardis-tickeler

Description

@tardis-tickeler

I created a workflow that analyzes the most recent failed build pipeline and reports the root cause of the failure.

To achieve this, I generated:

One Personal Access Token (PAT) with read access to Models

Another PAT scoped to the specific repository where the workflow runs, with permissions including Contents and Workflows

I’m using the model openai/gpt-4o.

Workflow configuration

My workflow step looks like this:

- name: Analyze build failure
  id: analyze
  uses: actions/ai-inference@v2
  with:
    prompt-file: '.github/models/failed-run-analyze.prompt.yml'
    enable-github-mcp: true
    token: ${{ secrets.AUTO_REMEDIATION_PAT }}
    github-mcp-token: ${{ secrets.AUTO_REMEDIATION_PULL_PAT }}
    max-tokens: 6000
    github-mcp-toolsets: 'actions'
    input: |
      repo: ${{ github.event.workflow_run.repository.full_name }}
      owner: ${{ github.event.repository.owner.login }}
      workflow_run_id: ${{ github.event.workflow_run.id }}
      trail_lines: 200

Issue 1: unknown tool "get_job_logs"

When I run this workflow, the logs show that the action successfully connects to the GitHub MCP server and action tool, but fails when attempting to execute the get_job_logs tool which was in my prompt file mentioned below:

Using prompt YAML file format
Connecting to GitHub MCP server...
Using GitHub MCP toolsets: actions
Successfully connected to GitHub MCP server
Retrieved 3 tools from GitHub MCP server
Mapped 3 GitHub MCP tools for Azure AI Inference
Running GitHub MCP inference with tools
MCP inference iteration 1
Model response: No response content
Model requested 1 tool calls
Executing GitHub MCP tool: get_job_logs with args: {...}
Warning: Failed to execute GitHub MCP tool get_job_logs: McpError: MCP error -32602: unknown tool "get_job_logs"

Issue 2: Tool not accessible from the model

Next, I tried removing the explicit toolset configuration by commenting out:

github-mcp-toolsets: 'action'

Instead, I instructed the model to use get_job_logs directly in the prompt file (failed-run-analyze.prompt.yml) with the following guidance:

You must use the GitHub MCP tool get_job_logs to retrieve failed job logs with the following rules:

- Only retrieve logs from FAILED jobs
- Ignore successful jobs completely
- Retrieve ONLY the last 200 lines per failed job
- Focus on error messages, stack traces, and failure summaries
- Do NOT retrieve full logs if they exceed this limit

With this setup, the workflow logs show that the MCP server exposes 23 tools, but the model still cannot access get_job_logs:

Using prompt YAML file format
Connecting to GitHub MCP server...
Using default GitHub MCP toolsets
Successfully connected to GitHub MCP server
Retrieved 23 tools from GitHub MCP server
Mapped 23 GitHub MCP tools for Azure AI Inference
Running GitHub MCP inference with tools
MCP inference iteration 1
Model response: Currently, the specific tool `get_job_logs` you mentioned is not accessible...
No tool calls requested, ending GitHub MCP inference loop

Question

Does this mean that:

  • The action can only use a predefined subset of the 23 MCP tools?
  • Or is get_job_logs not actually part of the available toolsets for this action?
  • Or is there some additional configuration or permission required to expose this tool to the model?

Any clarification or guidance on what’s happening here—and how to correctly enable get_job_logs—would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    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