Skip to content

Commit 99181d3

Browse files
authored
Highlight core tools and mcp servers in configuration docs (#160)
This is to make sure users know how to allowlist tools and to configure MCP servers. Related: #145 Preview: https://github.com/google-github-actions/run-gemini-cli/blob/docs/core-tools/examples/workflows/CONFIGURATION.md
1 parent 06123c6 commit 99181d3

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

examples/workflows/CONFIGURATION.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ This guide covers how to customize and configure Gemini CLI workflows to meet yo
66
- [How to Configure Gemini CLI](#how-to-configure-gemini-cli)
77
- [Key Settings](#key-settings)
88
- [Conversation Length (`maxSessionTurns`)](#conversation-length-maxsessionturns)
9+
- [Allowlist Tools (`coreTools`)](#allowlist-tools-coretools)
10+
- [MCP Servers (`mcpServers`)](#mcp-servers-mcpservers)
911
- [Custom Context and Guidance (`GEMINI.md`)](#custom-context-and-guidance-geminimd)
1012
- [GitHub Actions Workflow Settings](#github-actions-workflow-settings)
1113
- [Setting Timeouts](#setting-timeouts)
@@ -43,6 +45,59 @@ with:
4345
}
4446
```
4547
48+
#### Allowlist Tools (`coreTools`)
49+
50+
Allows you to specify a list of [built-in tools] that should be made available to the model. You can also use this to allowlist commands for shell tool.
51+
52+
**Default:** All tools available for use by Gemini CLI.
53+
54+
**How to configure:**
55+
56+
Add the following to your workflow YAML file to specify core tools:
57+
58+
```yaml
59+
with:
60+
settings: |-
61+
{
62+
"coreTools": [
63+
"read_file"
64+
"run_shell_command(echo)",
65+
"run_shell_command(gh label list)"
66+
]
67+
}
68+
```
69+
70+
#### MCP Servers (`mcpServers`)
71+
72+
Configures connections to one or more Model Context Protocol (MCP) servers for discovering and using custom tools. This allows you to extend Gemini CLI GitHub Action with additional capabilities.
73+
74+
**Default:** Empty
75+
76+
**Example:**
77+
78+
```yaml
79+
with:
80+
settings: |-
81+
{
82+
"mcpServers": {
83+
"github": {
84+
"command": "docker",
85+
"args": [
86+
"run",
87+
"-i",
88+
"--rm",
89+
"-e",
90+
"GITHUB_PERSONAL_ACCESS_TOKEN",
91+
"ghcr.io/github/github-mcp-server"
92+
],
93+
"env": {
94+
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}"
95+
}
96+
}
97+
}
98+
}
99+
```
100+
46101
### Custom Context and Guidance (`GEMINI.md`)
47102

48103
To provide Gemini CLI with custom instructions—such as coding conventions, architectural patterns, or other guidance—add a `GEMINI.md` file to the root of your repository. Gemini CLI will use the content of this file to inform its responses.
@@ -60,3 +115,5 @@ Only users with the following roles can trigger the workflow:
60115
- Repository Owner (`OWNER`)
61116
- Repository Member (`MEMBER`)
62117
- Repository Collaborator (`COLLABORATOR`)
118+
119+
[built-in tools]: https://github.com/google-gemini/gemini-cli/blob/main/docs/core/tools-api.md#built-in-tools

0 commit comments

Comments
 (0)