Gemini Code Assist 工具權限
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本通知說明 Gemini Code Assist 工具如何使用您的資料,以及代您發出 API 呼叫。
使用 Gemini Code Assist 工具時,Gemini Code Assist 工具會收集您的提示,並發出 API 呼叫,將從提示中擷取的資料傳送至第三方服務。本文件將概略說明各個工具可發出的 API 呼叫,以及與第三方服務共用的資料。
與第三方服務分享的資料
Gemini Code Assist 工具可將使用 @TOOL_NAME
語法傳送至該工具的任何資料,與第三方服務共用。Gemini Code Assist 工具不會在工具之間共用資料。除非您使用 @TOOL_NAME
語法提示,否則 Gemini Code Assist 工具不會將您的 Gemini Code Assist 即時通訊記錄分享給第三方服務。
以下各節列出 REST API 呼叫,當您透過 Gemini Code Assist 即時通訊功能向第三方工具發出要求時,這些工具可以代您發出這些呼叫。
GitHub
當您透過 Gemini Code Assist 對話提示 GitHub 工具時,它可以代您使用下列 REST API 呼叫:
issues-and-pull-requests.create-issue
:這個 REST API 呼叫會在 GitHub 存放區中,根據 GitHub 存放區、擁有者和問題標題建立問題。
issues-and-pull-requests.list-comments
:這個 REST API 呼叫會取得與提取要求或問題相關聯的註解,並提供 GitHub 存放區、擁有者和問題編號。
search.code
:在整個 GitHub 中搜尋程式碼。
search.commits
:您可以搜尋 GitHub 中所有專案的提交記錄,也可以搜尋特定存放區或機構中的提交記錄。」
search.issues-and-pull-requests
:這個 REST API 呼叫可讓您根據狀態 (例如已開啟或已關閉) 和關鍵字,搜尋特定問題和拉取要求,並擷取您有權存取的所有存放區中,與這些項目相關的所有資訊。
API 權限:
repo
:授予存取公開和私人存放區的完全存取權。這個範圍包含 repo:status
、repo_deployment
、public_repo
、repo:invite
、security_events
、administration
、read:org
、write:org
、read:public_key
、write:public_key
、read:gpg_key
、write:gpg_key
、gist
、workflow
和 codespace
。
GitLab
當您透過 Gemini Code Assist 對話提示時,GitLab 工具可以代您使用下列 REST API 呼叫:
ListProjects
:擷取目前使用者的專案清單。
ListIssues
:擷取指定專案的問題清單。
CreateIssue
:在指定專案中建立新問題。
ListMergeRequests
:擷取指定專案的合併要求清單。
ListMergeRequestPipelines
:擷取指定合併要求的管道清單。
API 權限:
read_api
:授予已驗證使用者 API 的唯讀存取權。
read_repository
:授予存放區的唯讀存取權。
read_user
:授予對已驗證使用者個人資料的唯讀存取權。
api
:授予已驗證使用者 API 的完整讀取/寫入存取權。
Google 文件
當您透過 Gemini Code Assist 對話提示時,Google 文件工具可以代您使用下列 REST API 呼叫:
ListFiles
:根據指定的查詢或篩選條件,擷取使用者 Google 雲端硬碟中的檔案清單。
Export
:匯出 Google 文件的內容,以便檢查內容。如果使用者要求特定檔案可能包含的任何資訊,就應呼叫這個 REST API。
API 權限:
drive.readonly
:允許使用者只讀取 Google 雲端硬碟檔案,包括您擁有的所有檔案和可存取的檔案。
Sentry
當您透過 Gemini Code Assist 即時通訊功能提示時,Sentry 工具可以代您使用下列 REST API 呼叫:
organizations
:傳回目前的 organization_id_or_slug
。
getIssue
:傳回個別問題的詳細資料。這會傳回問題的基本統計資料 (標題、上次看到、首次看到)、一些整體數字 (留言數、使用者回報數),以及匯總的事件資料。
transactions
:傳回受問題影響的交易清單
issues
:傳回指定機構和專案指派的問題和錯誤清單。
API 權限:
event:read
:允許讀取事件。
projects.read
:允許讀取專案相關資訊。
org.read
:允許讀取機構相關資訊。
Atlassian Rovo
當您透過 Gemini Code Assist 對話提示 Atlassian Rovo 工具時,它可以代您使用下列 REST API 呼叫:
completions
:以 OpenAI 格式 (即即時通訊訊息清單) 將要求傳送至 Atlassian Rovo
API 權限:
rovo
:授予使用者帳戶的 Atlassian Rovo 存取權。
MongoDB
當您透過 Gemini Code Assist 即時通訊功能提示時,MongoDB 工具可以代您使用下列 REST API 呼叫:
createConversation
:這個聊天機器人可以回答任何有關資料庫或 MongoDB 的問題,提供程式碼範例、解釋主題等。此作業會初始化對話。
addMessage
:這個聊天機器人可以回答任何有關資料庫或 MongoDB 的問題、提供程式碼範例、說明主題等。此操作會在對話中新增訊息。
API 權限:
- 未經使用者驗證。存取一般 MongoDB 文件聊天機器人。
New Relic
當您透過 Gemini Code Assist 即時通訊功能提出要求時,New Relic 工具可以代您使用下列 REST API 呼叫:
completions
:將使用者提示傳送至 New Relic AI 並接收回應的端點
API 權限:
- 存取使用者帳戶的 New Relic AI 端點。
Redis
當您透過 Gemini Code Assist 對話提示時,Redis 工具可以代您使用下列 REST API 呼叫:
chat
:將使用者提示傳送至 Redis AI 並接收回應的端點
API 權限:
- 未經使用者驗證。存取一般 Redis 聊天機器人。
Neo4j
當您透過 Gemini Code Assist 即時通訊功能提示時,Neo4j 工具可以代您使用下列 REST API 呼叫:
invoke
:將使用者提示傳送至 Neo4j AI 聊天機器人,並接收回應的端點
API 權限:
- 未經使用者驗證。存取一般 Neo4j 文件聊天機器人。
Snyk
當您透過 Gemini Code Assist 即時通訊功能提示時,Snyk 工具可以代您執行下列作業:
/scan
:從 Snyk 擴充功能擷取安全漏洞記錄
/scan new
:擷取最新的安全漏洞記錄
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[],[],null,["# Gemini Code Assist tools permissions\n\n| **Preview**\n|\n| This product or feature is in preview. Products and features that are\n| in preview are available \"as is\".\n\nThis notice describes how Gemini Code Assist tools use your data and\nmake API calls on your behalf.\n\nWhen you use Gemini Code Assist tools, Gemini Code Assist\ntools collect your prompts and make API calls that include data taken from your\nprompt to third-party services. This document outlines what API calls each tool\ncan make and what data is shared with the third party service.\n\nData shared with third-party services\n-------------------------------------\n\nGemini Code Assist tools can share any data sent to them using the\n`@TOOL_NAME` syntax with their third-party service. Gemini Code Assist\ntools don't share data between tools. Gemini Code Assist tools don't\nshare your Gemini Code Assist chat history with third-party services\nexcept when you prompt them using the `@TOOL_NAME` syntax.\n\nREST API calls used by Gemini Code Assist tools\n-----------------------------------------------\n\nThe following sections list the REST API calls each third-party tool can make\non your behalf when you prompt them from the Gemini Code Assist chat.\n\n### GitHub\n\nThe GitHub tool can use the following REST API calls on your behalf when you\nprompt it from the Gemini Code Assist chat:\n\n- `issues-and-pull-requests.create-issue`: This REST API call creates an issue in a GitHub repository given a GitHub repository, owner, and an issue title.\n- `issues-and-pull-requests.list-comments`: This REST API call gets the comments associated with a pull request or an issue. given a GitHub repository, owner, and an issue number.\n- `search.code`: Searches for code across all of GitHub.\n- `search.commits`: You can search for commits globally across all of GitHub, or search for commits within a particular repository or organization.\"\n- `search.issues-and-pull-requests`: This REST API call lets you search for specific issues and pull requests to retrieve all information related to them across all repositories you have permission to access based on their state (e.g. open or closed) and keywords.\n\nAPI permissions:\n\n- `repo`: Grants full access to public and private repositories. This scope includes `repo:status`, `repo_deployment`, `public_repo`, `repo:invite`, `security_events`, `administration`, `read:org`, `write:org`, `read:public_key`, `write:public_key`, `read:gpg_key`, `write:gpg_key`, `gist`, `workflow`, and `codespace`.\n\n### GitLab\n\nThe GitLab tool can use the following REST API calls on your behalf when you\nprompt it from the Gemini Code Assist chat:\n\n- `ListProjects`: Retrieves a list of projects for the current user.\n- `ListIssues`: Retrieves a list of issues for a specified project.\n- `CreateIssue`: Creates a new issue in a specified project.\n- `ListMergeRequests`: Retrieves a list of merge requests for a specified project.\n- `ListMergeRequestPipelines`: Retrieves a list of pipelines for a specified merge request.\n\nAPI permissions:\n\n- `read_api`: Grants read-only access to the authenticated user's API.\n- `read_repository`: Grants read-only access to the repository.\n- `read_user`: Grants read-only access to the authenticated user's profile information.\n- `api`: Grants complete read/write access to the authenticated user's API.\n\n### Google Docs\n\nThe Google Docs tool can use the following REST API calls on your behalf when\nyou prompt it from the Gemini Code Assist chat:\n\n- `ListFiles`: Retrieve a list of files in the user's Google Drive based on a given query or filters.\n- `Export`: Export the contents of a Google Doc in order to inspect its contents. If the user is asking for any information that may be contained within a given file, this is the REST API that should be called.\n\nAPI permissions:\n\n- `drive.readonly`: Allows read-only access to your Google Drive files, including all files you own and files have access to.\n\n### Sentry\n\nThe Sentry tool can use the following REST API calls on your behalf when you\nprompt it from the Gemini Code Assist chat:\n\n- `organizations`: Return the current `organization_id_or_slug`.\n- `getIssue`: Return details on an individual issue. This returns the basic stats for the issue (title, last seen, first seen), some overall numbers (number of comments, user reports) as well as the summarized event data.\n- `transactions`: Return a list of transactions affected by an issue\n- `issues`: Return a list of issues and errors assigned for the given organization and project.\n\nAPI permissions:\n\n- `event:read`: Allows reading events.\n- `projects.read`: Allows reading project-related information.\n- `org.read`: Allows reading organization-related information.\n\n### Atlassian Rovo\n\nThe Atlassian Rovo tool can use the following REST API calls on your behalf when\nyou prompt it from the Gemini Code Assist chat:\n\n- `completions`: Send a request to Atlassian Rovo in OpenAI format (a list of chat messages)\n\nAPI permissions:\n\n- `rovo`: Grants access to Atlassian Rovo in the user's account.\n\n### MongoDB\n\nThe MongoDB tool tool can use the following REST API calls on your behalf when\nyou prompt it from the Gemini Code Assist chat:\n\n- `createConversation`: This chatbot can answer any question about databases or MongoDB, provide examples of code, explain topics, etc. This operation initializes the conversation.\n- `addMessage`: This chatbot can answer any question about databases or MongoDB, provide examples of code, explain topics, etc. This operation adds a new message to the conversation.\n\nAPI permissions:\n\n- Not user-authenticated. Accesses the general MongoDB docs chatbot.\n\n### New Relic\n\nThe New Relic tool can use the following REST API calls on your behalf when you\nprompt it from the Gemini Code Assist chat:\n\n- `completions`: Endpoint to send user prompts to New Relic AI and receive responses\n\nAPI permissions:\n\n- Access to New Relic's AI endpoint for the user's account.\n\n### Redis\n\nThe Redis tool can use the following REST API calls on your behalf when you\nprompt it from the Gemini Code Assist chat:\n\n- `chat`: Endpoint to send user prompts to Redis AI and receive responses\n\nAPI permissions:\n\n- Not user-authenticated. Accesses the general Redis chatbot.\n\n### Neo4j\n\nThe Neo4j tool can use the following REST API calls on your behalf when you prompt\nit from the Gemini Code Assist chat:\n\n- `invoke`: Endpoint to send user prompts to Neo4j AI Chatbot and receive responses\n\nAPI permissions:\n\n- Not user-authenticated. Accesses the general Neo4j docs chatbot.\n\n### Snyk\n\nThe Snyk tool can perform the following operations on your behalf when you\nprompt it from the Gemini Code Assist chat:\n\n- `/scan`: Fetches vulnerability logs from Snyk Extension\n- `/scan new`: Fetches latest vulnerability logs\n\nWhat's next\n-----------\n\n- Read [Gemini Code Assist: Terms of Service and Privacy Policies](/gemini-code-assist/resources/privacy-notices).\n- Learn more about [how Gemini Code Assist works](/gemini-code-assist/docs/works)."]]