Skip to main content
Glama

Get execution metrics

get_project_metrics
Read-onlyIdempotent

Retrieve Apps Script execution metrics by day or week: active users, total/failed executions, optionally per deployment. Rising failed executions signal failures to inspect.

Instructions

Returns execution metrics for the project: activeUsers, totalExecutions and failedExecutions as time series ({ value, startTime, endTime }; value is absent when zero). granularity daily covers the last 7 days, weekly aggregates by week. deployment_id narrows the numbers to one deployment. A rising failedExecutions count is the cue to call list_processes with statuses=[FAILED] for the concrete failures. Requires the script.metrics scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_idYesThe script project id — from the Apps Script editor URL (script.google.com/home/projects/<scriptId>/edit) or from create_project output. For standalone projects it doubles as the Drive file id.
granularityYesdaily = last 7 days per day; weekly = per week.
deployment_idNoOnly count executions of this deployment.
Behavior4/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description adds important behavioral details: each metric is a time series, value is absent when zero, daily covers the last 7 days, and the script.metrics scope is required. It does not contradict the annotations.

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?

The description is dense but every sentence earns its place: purpose, response shape, granularity semantics, deployment behavior, failure-handling cue, and required scope. The main purpose is front-loaded, making it easy to scan.

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

Completeness5/5

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

For a read-only tool with three parameters and no output schema, the description supplies the response format, edge-case behavior for zero values, parameter effects, required permissions, and a concrete follow-up action. An agent has enough information to invoke it correctly and interpret results.

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

Parameters3/5

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

The input schema already has 100% parameter description coverage, so the baseline is 3. The description lightly reinforces the meaning of granularity and deployment_id, but does not add substantial semantic detail beyond what the schema already provides.

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?

The description opens with 'Returns execution metrics for the project' and names the specific metrics (activeUsers, totalExecutions, failedExecutions) plus the time-series shape. This clearly distinguishes it from siblings like list_processes and get_project by focusing on aggregate execution metrics.

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

Usage Guidelines5/5

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

The description explains when to use each granularity, what deployment_id does, and explicitly says that a rising failedExecutions count is the cue to call list_processes with statuses=[FAILED]. This gives the agent an explicit conditional alternative, not just a vague purpose.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/A1-x-Tech/mcp-google-apps-script'

If you have feedback or need assistance with the MCP directory API, please join our Discord server