Skip to main content
Glama

script.projects.getMetrics

Retrieve execution counts and active-user metrics for a specified script, with daily or weekly granularity and optional deployment filtering, returned as JSON.

Instructions

Get metrics data for scripts, such as number of executions and active users [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: create, get, getContent, updateContent.

Input Schema

NameRequiredDescriptionDefault
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
scriptIdYes[URL path segment] Required field indicating the script to get metrics for.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters.
metricsGranularityNo[query parameter] Required field indicating what granularity of metrics are returned. Values: `UNSPECIFIED_GRANULARITY` = Default metric granularity used to query no metrics.; `WEEKLY` = Represents weekly metrics.; `DAILY` = Represents daily metrics over a period of 7 days..
metricsFilter.deploymentIdNo[query parameter] Optional field indicating a specific deployment to retrieve metrics from.

Output Schema

NameRequiredDescriptionDefault
activeUsersNo
totalExecutionsNo
failedExecutionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / metricsFilter.deploymentId / description
      Previous value: -"Optional field indicating a specific deployment to retrieve metrics from."New value: +"[query parameter] Optional field indicating a specific deployment to retrieve metrics from."
    • changedInput schema / properties / metricsGranularity / description
      Previous value: -"Required field indicating what granularity of metrics are returned."New value: +"[query parameter] Required field indicating what granularity of metrics are returned. Values: `UNSPECIFIED_GRANULARITY` = Default metric granularity used to query no metrics.; `WEEKLY` = Represents weekly metrics.; `DAILY` = Represents daily metrics over a period of 7 days.."
    • changedInput schema / properties / scriptId / description
      Previous value: -"Required field indicating the script to get metrics for."New value: +"[URL path segment] Required field indicating the script to get metrics for."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "activeUsers": {
      +      "items": {
      +        "properties": {
      +          "endTime": {
      +            "type": "string"
      +          },
      +          "startTime": {
      +            "type": "string"
      +          },
      +          "value": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "failedExecutions": {
      +      "items": {
      +        "properties": {
      +          "endTime": {
      +            "type": "string"
      +          },
      +          "startTime": {
      +            "type": "string"
      +          },
      +          "value": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "totalExecutions": {
      +      "items": {
      +        "properties": {
      +          "endTime": {
      +            "type": "string"
      +          },
      +          "startTime": {
      +            "type": "string"
      +          },
      +          "value": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral burden. It usefully discloses HTTP GET and JSON return behavior, plus request-body construction via typed parameters or body_file, but it omits permission requirements, rate limits, and other operational constraints.

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 short and front-loads the core purpose before adding transport and sibling context. Some generic request-body detail is less relevant for a GET metrics call but does not materially harm readability.

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?

Given the rich schema, output schema, and absence of annotations, the description provides enough context to identify and call the tool. It could be more complete about auth or access requirements, but the main gap is minor for a read-only metrics operation.

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?

Schema coverage is 100%, so parameter meanings are already fully documented in the input schema. The description does not add parameter-specific semantics beyond noting that typed flags win over the params map, which is also present in the schema.

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: get metrics data for scripts, with examples ('number of executions and active users'), which clearly distinguishes it from generic project reads like get/getContent. The sibling list further anchors it among same-resource operations.

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

Usage Guidelines3/5

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

The description names sibling operations over the same resource, implying this tool is the metrics-specific read. However, it does not explicitly say when to use this instead of get or getContent, nor does it give conditions or exclusions.

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