tanaike - Google Apps Script, Gemini API, and Developer Tips

The Thinker

Updated: GAS Library - ToolsForMCPServer

ToolsForMCPServer was updated to v1.0.7

  • v1.0.7 (July 19, 2025)

    1. Added a getToolList method for retrieving all current tools in the library.
    2. Tools can be filtered using enables or disables as an array argument for the getTools method. If enables is used, only the tools specified in the enables array will be used. If disables is used, all tools except those specified in the disables array will be used. If neither enables nor disables is used, all tools will be used.

You can see the detailed information here https://github.com/tanaikech/ToolsForMCPServer

Managing Google Docs, Sheets, and Slides by Natural Language with Gemini CLI and MCP

Gists

Abstract

This report explores an optimized approach to integrating the Gemini CLI with Google Workspace via an MCP server. Traditionally, this process requires numerous custom tools, which increases development costs. We propose leveraging the inherent JSON schema requirements of the MCP server tools to directly construct request bodies for the batchUpdate methods of the Google Docs, Sheets, and Slides APIs. This approach aims to consolidate document management into just three core tools, significantly streamlining development and offering a scalable, cost-effective solution for Google Workspace automation and broader API integrations.

Next-Level Data Automation: Gemini CLI, Google Sheets, and MCP

Gists

Abstract

This article explores the integration of the Gemini Command-Line Interface (CLI) with Google Sheets using the Model Context Protocol (MCP). It demonstrates how to leverage the open-source projects MCPApp and ToolsForMCPServer to create a bridge between the Gemini CLI and Google Workspace. This enables users to perform powerful data automation tasks, such as creating, reading, and modifying tables in Google Sheets directly from the command line, using natural language prompts. The article provides practical examples and sample prompts to illustrate the seamless workflow and potential for building sophisticated, AI-powered applications within the Google Cloud ecosystem.

Gemini CLI: Featuring an Enhanced ToolsForMCPServer

Gists

Abstract

This report introduces ToolsForMCPServer, an enhanced Google Apps Script library that expands the capabilities of Gemini CLI. It showcases new tools that streamline complex workflows, with a special emphasis on facilitating seamless file content transfer and management between a user’s local environment and Google Drive.

Introduction

This report details significant enhancements to ToolsForMCPServer, a powerful Google Apps Script library designed to work in tandem with Gemini CLI. By integrating this library with a Model Context Protocol (MCP) server, the capabilities of Gemini CLI are dramatically expanded, especially in its interaction with Google Workspace services. This document will explore the core architecture that makes this possible, introduce the new tools available in the library, and demonstrate their power through practical examples that bridge the local command line with the cloud.

Processing File Content Using Gemini CLI with an MCP Server Built by Google Apps Script

Gists

Abstract

This report details two methods for processing files using the Gemini CLI and a Google Apps Script MCP server: direct Base64 encoding and indirect transfer via the Google Drive API using ggsrun. The direct method proved ineffective due to token limits. The recommended approach, leveraging ggsrun, allows for efficient, scalable file transfers by using file IDs instead of embedding content within the prompt, enabling advanced automation capabilities.

Gemini CLI with MCP Server: Expanding Possibilities with Google Apps Script

Gists

Abstract

The Gemini CLI provides a powerful command-line interface for interacting with Google’s Gemini models. By leveraging the Model Context Protocol (MCP), the CLI can be extended with custom tools. This report explores the integration of the Gemini CLI with an MCP server built using Google Apps Script Web Apps. We demonstrate how this combination simplifies authorization for Google Workspace APIs (Gmail, Drive, Calendar, etc.), allowing Gemini to execute complex, multi-step tasks directly within the Google ecosystem. We provide setup instructions and several practical examples showcasing how this integration unlocks significant potential for automation and productivity enhancement.

Gemini CLI with MCP Server Built by Web Apps of Google Apps Script

Gists

Abstract

The Gemini CLI can be integrated with Google Workspace via Google Apps Script to securely access personal data, enabling powerful automations like email summaries and calendar management.

Introduction

The recently released Gemini CLI is a powerful command-line interface for interacting with Google’s Gemini models and cloud resources. Ref While powerful on its own, its utility can be significantly enhanced by connecting it to a user’s personal Google resources, such as Google Sheets, Docs, Slides, Gmail, and Calendar.

A Practical Analysis of the Gemini API's URL Context Tool

Gists

Introduction

The Gemini API recently introduced the URL context tool, a feature designed to allow the model to directly fetch and utilize content from specified URLs to ground its responses. Ref

This report provides a practical demonstration of this tool’s capabilities. We will investigate its impact on two critical aspects of AI model interaction: the accuracy of the generated response and the total token consumption, which directly affects API costs.

Major Update: Taking Advantage of Web Apps with Google Apps Script

Description

I am thrilled to announce a significant update to the Taking Advantage of Web Apps with Google Apps Script repository! Now at Version 2.0.0, this comprehensive guide has been extensively revised and expanded to provide unparalleled insights and practical guidance for developers leveraging Google Apps Script Web Apps.

This major overhaul introduces a wealth of new and enhanced content, designed to empower you with a deeper understanding and more advanced capabilities.

Managing Smart Chips on Google Sheets with Sheets API

Gists

Overview

Google Sheets now supports managing smart chips via its API, enabling retrieval and placement with Apps Script and other languages.

Description

Smart chips in Google Sheets and Docs are a powerful feature designed to enhance collaboration and information sharing. While there historically haven’t been built-in Google Apps Script methods to manage these chips, a workaround was previously developed to address this limitation (Ref).

However, Google has recently introduced direct methods for managing smart chips within the Google Sheets API (Ref). This report provides sample Google Apps Script code that demonstrates how to get and put smart chips on Google Sheets using these new API methods. Although these methods are currently exclusive to Google Sheets, their availability via the Sheets API means they can also be utilized with other programming languages, not just Google Apps Script. It will be anticipated that similar functionality will be extended to Google Docs in future updates.