Importance of Time Information in Gemini and Current Time Handling

Gists

Importance of Time Information in Gemini and Current Time Handling

Abstract

This report investigates how Gemini handles current time information, particularly when using the Gemini API. We found that while the Gemini web interface knows the current time, the Gemini API does not inherently. Therefore, applications must explicitly provide current time information in API calls for accurate time-sensitive responses.

Introduction

The rapidly advancing field of generative AI is enabling increasingly complex tasks, particularly through the use of open protocols like the Model Context Protocol (MCP) and Agent2Agent (A2A) Protocol. These protocols facilitate sophisticated operations that often require accurate and dynamic information, including time-sensitive data. For instance, applications that manage schedules or coordinate events critically depend on precise time information.

Automating Straight to Smart Quote Conversion in Google Docs

Gists

Automating Straight to Smart Quote Conversion in Google Docs

Abstract

For extensive Google Docs, manually converting straight to smart quotes is inefficient. This report offers an automated solution using Google Apps Script, saving time and effort.

Description

You might find yourself needing to convert straight quotes (both single and double) to smart quotes in Google Docs. For small documents with a limited number of quotes, this can be done manually with minimal effort. However, when dealing with extensive documents and numerous quotes, the manual process becomes time-consuming and inefficient. This report presents a solution to automate this conversion using Google Apps Script, significantly reducing the processing cost for larger projects.

Enabling Collaborative Agent Systems through Google Apps Script-based Agent2Agent (A2A) Network

Gists

Enabling Collaborative Agent Systems through Google Apps Script-based Agent2Agent (A2A) Network

Abstract

This report details the Agent2Agent (A2A) network built with Google Apps Script’s Web Apps. It facilitates communication between diverse AI agents, overcoming platform limitations. Key improvements include parallel task execution with asynchronous processes and enhanced security through secure access token handling and user-specific Web App availability, demonstrating a robust and secure A2A implementation.

Introduction

This report details an updated implementation of Agent2Agent (A2A), an open protocol designed to enable communication and collaboration between diverse AI agents. The goal of A2A is to overcome limitations of isolated platforms, allowing AI agents to work together on complex tasks while maintaining their internal structures. I recently published a report titled “Building Agent2Agent (A2A) Server with Google Apps Script”. Ref This updated report focuses on successfully creating an A2A network using Google Apps Script’s Web Apps functionality.

Building Agent2Agent (A2A) Server with Google Apps Script

Gists

Building Agent2Agent (A2A) Server with Google Apps Script

Abstract

Exploring Agent2Agent (A2A) protocol implementation in Google Apps Script seamlessly allows AI agents to access Google Workspace data and functions. This could enable complex workflows and automation, overcoming platform silos for integrated AI applications.

Introduction

Agent2Agent (A2A) is a proposed open protocol facilitating communication and collaboration among diverse AI agents, aiming to overcome platform silos and enable complex tasks while preserving agent opacity. This report examines the feasibility of implementing a core A2A server component using Google Apps Script within Google Workspace. Such an implementation could seamlessly allow AI agents to securely access and utilize data and functionalities across Google services like Docs, Sheets, and Gmail via a standardized protocol. This would enable sophisticated AI-powered workflows and automation directly linked to user data. A sample script demonstrates the technical potential despite the current lack of a dedicated Apps Script SDK for A2A. While acknowledging potential Apps Script limitations, such as execution time, this exploratory approach remains valuable for developing internal or user-centric AI applications and integrations within Google Workspace. A successful demonstration could potentially highlight the capabilities of Google Apps Script.

Managing Tables on Google Sheets using Google Apps Script

Gists

Managing Tables on Google Sheets using Google Apps Script

Abstract

Google Sheets API now supports programmatic table management (create, delete, modify) as of April 29, 2025. This eliminates previous workarounds and enables direct control, including with Apps Script.

Introduction

Google Sheets tables can now be managed programmatically via the Sheets API, a significant update officially released on April 29, 2025. Ref I learned about this important development from Martin Hawksey’s Apps Script Pulse newsletter. Ref I am very grateful to Martin for bringing this to light. This update introduces the ability to programmatically manage tables directly through the Sheets API, enabling operations such as creating, deleting, and modifying tables and their properties. Previously, programmatic interaction with Sheets tables was limited and often required using workarounds for even simple management tasks, as explored in my earlier reports Ref and Ref. With this official API support, more robust and direct control is now possible. In this report, I will introduce how to manage tables on Google Sheets using the Sheets API, with examples implemented using Google Apps Script. It is worth noting, of course, that the Sheets API can also be used with other programming languages besides Apps Script.

Image Transfer: MCP Server (Web Apps/Google Apps Script) to MCP Client (Gemini/Python)

Gists

Abstract

This report details transferring image data via Model Context Protocol (MCP) from Google Apps Script server to a Python/Gemini client, extending capabilities for multimodal applications beyond text.

Introduction

Following up on my previous report, “Building Model Context Protocol (MCP) Server with Google Apps Script” (Ref), which detailed the transfer of text data between the MCP server and client, this new report focuses on extending the protocol to handle image data. It introduces a practical method for transferring image data efficiently from the Google Apps Script-based MCP server to an MCP client. In this implementation, the MCP client was built using Python and integrated with the Gemini model, allowing for the processing and utilization of the transferred image data alongside text, thereby enabling more complex, multimodal applications within the MCP framework.

Building Model Context Protocol (MCP) Server with Google Apps Script

Gists

Building Model Context Protocol (MCP) Server with Google Apps Script

Abstract

This text introduces the Model Context Protocol (MCP) for standardizing AI interaction with external systems. It explores the potential of using Google Apps Script (GAS) to host an MCP server, leveraging GAS’s integration with Google Workspace for data access. A sample script demonstrates feasibility, highlighting the current absence of an official GAS SDK. The work aims to foster understanding and encourage SDK development.