fix: correct invalid Gemini CLI tool names in agents and docs#35
fix: correct invalid Gemini CLI tool names in agents and docs#35
Conversation
Replace `search_files` with `search_file_content` and `replace_in_file` with `replace` across all agent frontmatter and documentation. These were not valid Gemini CLI built-in tool names and caused agent loading failures at startup (validation error: `tools.N: Invalid tool name`). The terminology tables in docs/ that mapped Claude Code tools to Gemini CLI equivalents were the source of the incorrect names, which had propagated into 18 agent files. Fixes #34
efc1312 to
01892d0
Compare
…ames Ignore auto-review on release/version-bump PRs via ignore_title_keywords. Add path_instructions for agents/**/*.md that explicitly restrict the frontmatter `tools:` array to valid Gemini CLI tool names, preventing the class of bug reported in #34 from being reintroduced.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughAdds a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@agents/docs-lookup.md`:
- Line 4: The frontmatter tools array contains non-allowlisted MCP tool names
(mcp__context7__resolve-library-id and mcp__context7__query-docs) which must be
removed; update the tools array in agents/docs-lookup.md to include only
built-in Gemini CLI tool names (e.g., keep "read_file" and "search_file_content"
and remove the mcp__... entries) so the agent frontmatter complies with the
built-in-only rule and will pass startup validation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: eaf098ce-e7d2-48b3-9517-b825a455a7ed
📒 Files selected for processing (45)
.coderabbit.yamlCONTRIBUTING.mdagents/architect.mdagents/chief-of-staff.mdagents/code-architect.mdagents/code-explorer.mdagents/code-reviewer.mdagents/code-simplifier.mdagents/comment-analyzer.mdagents/conversation-analyzer.mdagents/cpp-build-resolver.mdagents/cpp-reviewer.mdagents/csharp-reviewer.mdagents/dart-build-resolver.mdagents/docs-lookup.mdagents/flutter-reviewer.mdagents/gan-evaluator.mdagents/gan-generator.mdagents/gan-planner.mdagents/harness-optimizer.mdagents/healthcare-reviewer.mdagents/java-build-resolver.mdagents/java-reviewer.mdagents/kotlin-build-resolver.mdagents/kotlin-reviewer.mdagents/loop-operator.mdagents/opensource-forker.mdagents/opensource-packager.mdagents/opensource-sanitizer.mdagents/performance-optimizer.mdagents/planner.mdagents/pr-test-analyzer.mdagents/pytorch-build-resolver.mdagents/rust-build-resolver.mdagents/rust-reviewer.mdagents/seo-specialist.mdagents/silent-failure-hunter.mdagents/type-design-analyzer.mdagents/typescript-reviewer.mddocs/en/agents/README.mddocs/en/contributing/SKILL-PLACEMENT-POLICY.mddocs/en/contributing/TERMINOLOGY.mddocs/ko-KR/contributing/README.mddocs/ko-KR/contributing/SKILL-PLACEMENT-POLICY.mddocs/ko-KR/contributing/TERMINOLOGY.md
- chief-of-staff: add missing Slack MCP tools to frontmatter `tools:` array so the agent can actually call them at runtime - docs/ko-KR TERMINOLOGY: add WebSearch → google_web_search row to match the English version - .coderabbit.yaml: loosen agent `tools:` rule to allow MCP tools (mcp__<server>__<tool>) alongside built-ins, and flag body-referenced MCP tools that are missing from the frontmatter declaration
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.coderabbit.yaml:
- Around line 57-58: The "Skill definitions" guidance is ambiguous about where
the "When to Use" / "Ideal For" sections should live; update the
.coderabbit.yaml text under the "Skill definitions" block so it explicitly
states that frontmatter must include `name` and `description`, while the "When
to Use" / "Ideal For" explanatory sections should appear in the document body
(not frontmatter) and be specific and actionable; reference the existing `name`
and `description` frontmatter requirements and the literal section headings
"When to Use" / "Ideal For" so readers know exactly where to place them.
- Around line 66-67: Update the shell script guidance line that currently reads
"Shell scripts must use `set -e`, quote all variables, and avoid interpolating
shell variables into `node -e` strings" to recommend also enabling `set -u` and
`set -o pipefail`; specifically, change the guidance text to include `set -u`
(error on undefined variables) and `set -o pipefail` (fail on pipeline errors)
so scripts are required to use `set -e`, `set -u`, `set -o pipefail`, quote all
variables, and avoid interpolating shell variables into `node -e` strings (use
`process.env` instead).
- Line 45: The documented MCP tool naming pattern is incorrect: replace the
double-underscore pattern `mcp__<server>__<tool_name>` with the correct
single-underscore pattern `mcp_<server>_<tool_name>` so generated tool names
match the Gemini CLI/Gemini API regex; update the string in the documentation
entry that references the MCP naming pattern to use `mcp_<server>_<tool_name>`
everywhere it appears (so discovery output will validate).
- Around line 42-44: Update the Gemini CLI tool list by removing the deprecated
tools "replace" and "save_memory", replace the legacy alias
"search_file_content" with "grep_search", and expand the list to exactly:
read_file, read_many_files, write_file, glob, list_directory, run_shell_command,
web_fetch, google_web_search, grep_search, ask_user, write_todos,
get_internal_docs, activate_skill, enter_plan_mode; edit the string/list that
currently contains read_file,...,replace,save_memory (as shown in the diff) to
match the new set and then verify the final list against the official Gemini CLI
tools reference to ensure no additional tools are missing or misnamed.
In `@agents/chief-of-staff.md`:
- Line 4: The frontmatter tools array is missing the Slack MCP tool used by the
agent body: add "mcp__slack__conversations_add_message" to the tools list in
agents/chief-of-staff.md so the referenced conversations_add_message action
(mentioned in the body) can be invoked at runtime; ensure the exact identifier
mcp__slack__conversations_add_message is added alongside the existing
mcp__slack__... entries.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 10278338-2199-4539-bfce-806d2a7d8e7e
📒 Files selected for processing (3)
.coderabbit.yamlagents/chief-of-staff.mddocs/ko-KR/contributing/TERMINOLOGY.md
- chief-of-staff: declare `mcp__slack__conversations_add_message` in frontmatter; it is referenced in the body at line 102 (send action) and would otherwise be unavailable at runtime - .coderabbit.yaml: clarify that skill "When to Use"/"Ideal For" sections live in the document body (not frontmatter); tighten shell-script guidance to `set -euo pipefail` Not changed (disputed): - MCP tool naming convention remains `mcp__<server>__<tool>` (double underscore) — matches existing usage across chief-of-staff, docs-lookup, and gan-evaluator; single-underscore variant would break all current agents - `replace` and `save_memory` kept in the built-in allow-list — this PR itself proves `replace` is valid (it is the fix for #34); the CodeRabbit web-search result claiming they are deprecated is inconsistent with the Gemini CLI version this repo targets
Replace
search_fileswithsearch_file_contentandreplace_in_filewithreplaceacross all agent frontmatter and documentation. These were not valid Gemini CLI built-in tool names and caused agent loading failures at startup (validation error:tools.N: Invalid tool name).The terminology tables in docs/ that mapped Claude Code tools to Gemini CLI equivalents were the source of the incorrect names, which had propagated into 18 agent files.
Fixes #34
Summary by CodeRabbit
Chores
Documentation