Gemini Code Assist ツールを有効にする
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このドキュメントでは、Gemini Code Assist ツールを有効にする方法について説明します。Google Cloud 管理者は、IDE でデベロッパー向けのツールを有効にするために、次の手順を完了する必要があります。
ツールの詳細については、Gemini Code Assist ツールの概要をご覧ください。IDE で使用するツールを構成するには、Gemini Code Assist ツールを構成するをご覧ください。
始める前に
- Gemini Code Assist を設定します。
- Google Cloud プロジェクトで課金が有効になっていることを確認する
Developer Connect API を有効にします。
API の有効化
Developer Connect は、Google と Gemini Code Assist ツール間の接続を作成するために使用します。
必要なロール
Gemini Code Assist ツールを有効にするために必要な権限を取得するには、Google Cloud プロジェクトに対する
Gemini Code Assist ツール管理者(
roles/cloudaicompanion.codeToolsAdmin
)ロールを付与するよう管理者に依頼してください。
ロールの付与については、プロジェクト、フォルダ、組織へのアクセス権の管理をご覧ください。
必要な権限は、カスタムロールや他の事前定義ロールから取得することもできます。
Google API Console で、Gemini Code Assist の [ツール] ページに移動します。
[ツール] に移動
有効にするツールを見つけて、[有効にする] をクリックします。ツールの詳細ページが開きます。
[構成] セクションで、ツールの Developer Connect アカウント コネクタを作成するリージョンを選択します。使用可能なリージョンについては、Developer Connect のロケーションをご覧ください。
[有効にする] をクリックします。
ツールが有効になっている。
IDE でツールを使用するときに、アカウントに接続するよう求められます。IDE でツールを使用する場合は、[接続] をクリックし、指示に従ってアカウントを接続します。このツールを使用しない場合は、接続手順をスキップできます。
開発者に Google Cloud プロジェクトに対する Gemini Code Assist ツール ユーザー(roles/cloudaicompanion.codeToolsUser
)ロールを付与します。
デベロッパーは IDE でこのツールを使用できます。ユーザーは、Gemini Code Assist チャットで @TOOL_NAME
を使用してツールにプロンプトを送信し、有効な Gemini Code Assist ツールの認証を行うことができます。ここで、TOOL_NAME は Gemini Code Assist ツールの名前です。
次のステップ
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-02 UTC。
[null,null,["最終更新日 2025-09-02 UTC。"],[],[],null,["| **Preview**\n|\n| This product or feature is in preview. Products and features that are\n| in preview are available \"as is\".\n\nThis document describes how to enable Gemini Code Assist tools.\nGoogle Cloud administrators should complete these steps to enable tools for\ndevelopers in their IDEs.\n\nFor more information about tools, read the\n[Gemini Code Assist tools overview](/gemini-code-assist/docs/tools-agents/tools-overview). To configure tools\nfor use in your IDE, see\n[Configure Gemini Code Assist tools](/gemini-code-assist/docs/tools-agents/configure-tools-standard-enterprise).\n\nBefore you begin\n\n1. [Set up Gemini Code Assist](/gemini-code-assist/docs/set-up-gemini-standard-enterprise).\n2. [Make sure billing is enabled for your Google Cloud project](https://cloud.google.com/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project)\n3. Enable the Developer Connect API.\n\n [Enable the API](https://console.cloud.google.com//flows/enableapi?apiid=developerconnect.googleapis.com)\n\n Developer Connect is used to create connections between Google and\n Gemini Code Assist tools.\n\nRequired roles To get the permissions that you need to enable Gemini Code Assist tools, ask your administrator to grant you the [Gemini Code Assist Tools Admin](https://cloud.google.com/iam/docs/roles-permissions/cloudaicompanion#cloudaicompanion.codeToolsAdmin) (`roles/cloudaicompanion.codeToolsAdmin`) role on the Google Cloud project.\n\n\u003cbr /\u003e\n\nFor more information about granting roles, see\n[Manage access to projects, folders, and organizations](https://cloud.google.com/iam/docs/granting-changing-revoking-access).\n\nYou might also be able to get the required permissions through\n[custom roles](https://cloud.google.com/iam/docs/creating-custom-roles) or\nother [predefined roles](https://cloud.google.com/iam/docs/understanding-roles).\n\n\nEnable tools\n\n1. In the Google API Console, go to the Gemini Code Assist **Tools**\n page.\n\n\n [Go to Tools](https://console.cloud.google.com/gemini-code-assist/agents-tools)\n2. Locate the tool you want to enable and then click **Enable**. The tool\n details page opens.\n\n3. In the **Configuration** section, select a region to create your\n Developer Connect account connector in for the tool. The available\n regions are listed in\n [Developer Connect locations](https://cloud.google.com/developer-connect/docs/locations).\n\n4. Click **Enable**.\n\n The tool is enabled.\n\n You are prompted to connect to your account to use the tool in the\n IDE. If you want to use the tool in the IDE, then click **Connect** and\n follow the instructions to connect your account. You can skip the connection\n step if you don't want to use the tool.\n5. Grant your developers the\n [Gemini Code Assist Tools User](https://cloud.google.com/iam/docs/roles-permissions/cloudaicompanion#cloudaicompanion.codeToolsUser) (`roles/cloudaicompanion.codeToolsUser`) role on the Google Cloud\n project.\n\n The tool is available to developers in their IDEs. Users can authenticate to\n enabled Gemini Code Assist tools by prompting the tool in the\n Gemini Code Assist chat with `@`\u003cvar translate=\"no\"\u003eTOOL_NAME\u003c/var\u003e. Where\n \u003cvar translate=\"no\"\u003eTOOL_NAME\u003c/var\u003e is the name of the Gemini Code Assist tool.\n\nWhat's next\n\n- [Configure Gemini Code Assist tools](/gemini-code-assist/docs/tools-agents/configure-tools-standard-enterprise).\n- [Get Started with Gemini Code Assist tools](/gemini-code-assist/docs/tools-agents/get-started-with-tools-standard-enterprise)."]]