Skip to main content
Glama
Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Google Workspace MCP Server - Control Gmail, Calendar, Docs, Sheets, Slides, Chat, Forms & Drive

Get Script Activity

get_script_activity
Read-onlyIdempotent

Retrieve Google Apps Script execution activity: list recent runs or view daily/weekly metrics for a script to monitor performance and failures.

Instructions

Read execution activity for scripts: recent processes or aggregate metrics.

Actions: - "processes": List recent execution processes. Without script_id, lists the user's own recent runs; with script_id, lists all processes for that script visible to the user (including runs by others). Optional page_size. - "metrics": Get aggregate execution metrics (active users, total and failed executions) for one script. Requires script_id; optional metrics_granularity ("DAILY" or "WEEKLY").

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user_google_email": "<user_google_email>",
      "action": "<action>"
    },
    "name": "get_script_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesOne of "processes", "metrics".
page_sizeNoNumber of results for processes (default: 50).
script_idNoThe script project ID (required for metrics; optional for processes).
user_google_emailYesUser's email address
metrics_granularityNoGranularity for metrics - "DAILY" or "WEEKLY".DAILY

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.28.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/openWorld/idempotent annotations, the description discloses real behavioral detail: without script_id you see only your own runs, with script_id you see all processes visible to the user including runs by others. It does not describe pagination continuation, rate limits, or how far back "recent" extends, which are the remaining unknowns.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line summary followed by a bulleted per-action breakdown that maps directly onto the action enum, so the reader can scan to the relevant mode. Wording is tight, though the per-action repetition of "script_id" requirements could be compressed slightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be explained, and the conditional parameter rules are covered. The one substantive gap is the time window implied by "recent processes", which the agent cannot infer from the schema or the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds conditional semantics the schema cannot express: script_id is required for metrics yet optional for processes, page_size applies only to processes, and metrics_granularity only to metrics. This conditional applicability is the most valuable content in the definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Read execution activity for scripts") and decomposes it into two named actions, "processes" and "metrics", each with its own scope. This cleanly separates it from sibling tools that deal with project metadata, versions, or deployments rather than runtime activity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The action bullets give conditional guidance: use "processes" for recent runs, use "metrics" for aggregates, and metrics requires script_id. It never explicitly names an alternative sibling tool or states when-not to use this tool, so routing guidance is clear but not exhaustive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools