使用大型語言模型 (LLM) 開發 Google Workspace 應用程式
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面提供最佳做法和建議工具的總覽,協助您運用大型語言模型 (LLM) 開發 Google Workspace 解決方案。
在 Google Workspace 上開發時,LLM 可協助您完成下列工作:
- 產生或排解呼叫 Google Workspace API 的程式碼。
- 根據最新的 Google Workspace 開發人員文件建構解決方案。
- 透過指令列或整合開發環境 (IDE) 存取 Google Workspace 資源。
使用 Google Workspace 適用的 Model Context Protocol (MCP)
模型上下文協定 (MCP)
是一項標準化開放協定,可為 LLM 和 AI 代理提供背景資訊,
讓這些模型/代理在多輪對話中傳回品質更高的資訊。
Google Workspace 具有 MCP 伺服器,可提供 LLM 架構,方便存取及搜尋開發人員文件。建構或使用 AI 代理程式時,您可以使用這個伺服器執行下列任一操作:
如要部署伺服器,請前往 Google Workspace GitHub 存放區:
在 GitHub 上查看 Google Workspace MCP 開發人員輔助工具
建議您將下列 AI 程式碼輔助工具納入 Google Workspace 開發工作流程:
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-31 (世界標準時間)。
[null,null,["上次更新時間:2025-08-31 (世界標準時間)。"],[],[],null,["# Use Large Language Models (LLMs) to develop on Google Workspace\n\n|-------------------------------------------------------------------------------------------------------------------------------------------|\n| Got 5 minutes? Help us improve the Google Workspace documentation by taking a quick [online survey](https://forms.gle/qYR2wnTRueYeQeSi6). |\n\nThis page provides an overview of best practices and recommended tools for\nworking with Large Language Models (LLMs) to develop solutions for\nGoogle Workspace.\n\nWhen developing on Google Workspace, LLMs can help you in the\nfollowing ways:\n\n- Generate or troubleshoot code for calling Google Workspace APIs.\n- Build a solution based on the latest Google Workspace developer documentation.\n- Access Google Workspace resources from the command line or your integrated development environment (IDE).\n\nUse a Model Context Protocol (MCP) for Google Workspace\n-------------------------------------------------------\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction)\nis a standardized open protocol that provides context to LLMs and AI agents so that\nthey can return better quality information in multi-turn conversations.\n\nGoogle Workspace has an MCP server that provides a schema for an LLM\nto access and search developer documentation. You can use this server when\nyou're building or using AI agents to do any of the following:\n\n- Retrieve up-to-date information about Google Workspace APIs and services.\n- Build and preview [user interfaces (UIs) that extend Google Workspace applications](/workspace/extend). You can use these UIs to build Google Workspace add-ons, Google Chat apps, Google Drive apps, and more.\n\nTo deploy the server, visit the Google Workspace GitHub repository:\n\n[View Google Workspace MCP Developer Assist on GitHub](https://github.com/googleworkspace/dev-assist)\n\nUse AI code assistants\n----------------------\n\nWe recommend the following AI code assist tools to incorporate into your\nworkflow for Google Workspace development:\n\n- [Google AI Studio](https://ai.google.dev/aistudio): Generate code for\n your Google Workspace solutions, including code for\n [Google Apps Script](/apps-script) projects.\n\n- [Gemini Code Assist](/gemini-code-assist/docs/overview): Lets you use\n LLMs right from your IDE and includes the\n [`@googledocs`](/workspace/docs/api/how-tos/read-docs-gemini-tool) command to\n access Google Docs documents.\n\nRelated topics\n--------------\n\n- [Build with AI for Google Workspace](/workspace/guides/ai-overview)\n- [Extend the Google Workspace UI](/workspace/extend)\n- [Gemini for Google Cloud overview](https://cloud.google.com/gemini/docs/overview)\n- [Read documents while coding with Gemini Code Assist](/workspace/docs/api/how-tos/read-docs-gemini-tool)"]]