Skip to content

pr-review example ships tools.core: [] which disables all MCP tools since gemini-cli v0.41.0 – workflow green but no review posted #532

Description

@philwatt

TL;DR

The examples/workflows/pr-review example ships with:

"tools": {
  "core": []
}

Since gemini-cli v0.41.0 (google-gemini/gemini-cli#25720), any tools.core value – including the empty array – makes the policy engine emit a wildcard * DENY that statically excludes every MCP tool from the tool registry, even in YOLO mode and even with the MCP server trusted/allowed. That means the example as shipped disables the github-mcp-server the workflow depends on: the model receives no MCP tool declarations, blind-guesses tool names until maxSessionTurns is exhausted (Tool "<name>" not found. Did you mean "activate_skill"?), and – because the CLI exits 0 with the error only embedded in JSON stdout – the workflow stays green while posting no review.

Full root-cause analysis with source references at gemini-cli v0.50.0 (policy priorities, PolicyEngine.getExcludedTools(), repro, verified workarounds) is in the upstream report: google-gemini/gemini-cli#28361.

Expected behavior

Deploying the pr-review example as documented produces a PR review.

Observed behavior

Green workflow run, no review posted. Logs show the MCP server's tools being discovered (Refresh for 'github' discovered 3 tools) but none callable; the run ends in FatalTurnLimitedError inside the JSON stdout with exit code 0. (That the action treats this as success is #519; the extension's stale hard-coded tool names, #510, make the blind-guessing loop even less likely to accidentally recover.)

Suggested fix

Until/unless the upstream policy behaviour changes, the example settings should allowlist what the workflow actually needs. Verified working end-to-end:

"tools": {
  "core": [
    "activate_skill",
    "mcp_github_*"
  ]
}

or equivalently "tools": { "allowed": ["mcp_github_*"] } plus "core": ["activate_skill"]. Note activate_skill must be allowlisted explicitly – the code-review extension's mandatory skill activation is a built-in tool call that "core": [] also denies.

Environment

  • google-github-actions/run-gemini-cli with the pr-review example as shipped (gemini-cli-extensions/code-review extension, github-mcp-server v0.27.0)
  • gemini-cli v0.50.0, GitHub Actions ubuntu-latest, non-interactive mode, GEMINI_API_KEY auth

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