Connect the Google Apps Script MCP server to your AI agent Open source, MIT, on npm. Setup instructions for Claude, Cursor and Codex are in the repository; adoption questions — Telegram. GitHub repository Telegram

Google Apps Script: Get execution metrics — MCP tool

Google Apps Script MCP tool: Reads a project's execution statistics — users, runs and failures over time.

Technical name: get_project_metrics

What task it solves

I want to see how often a script runs and how often it fails.

Returns activeUsers, totalExecutions and failedExecutions as time series, per day (last 7 days) or per week.

When to use it

Use it as the health overview of a deployed script: a rising failedExecutions series is the cue to drill down with list_processes filtered to FAILED. deployment_id narrows the numbers to one deployment.

What to provide

  • script_idrequired.
  • granularityrequired. daily (last 7 days per day) or weekly.
  • deployment_idoptional. Only count executions of this deployment.

What it returns

Three arrays of { value, startTime, endTime } as compact JSON; value is absent when zero.

What changes in Google Apps Script

Nothing — this is a pure read.

Example request

How many executions of script 1AbC... failed this week, per day?

Errors and limitations

Requires the script.metrics scope. Metrics are aggregates only — no per-execution details and no error messages; daily granularity covers only the last 7 days.

Access also depends on token permissions, quotas, and upstream API limits.

Related MCP tools

Technical details