Skip to main content
Glama

get_deployment_stats

Fetches query volume, outcome split, and run durations for a deployment, with configurable rolling window and granularity. Use it to monitor performance and diagnose issues.

Instructions

Fetches query volume, outcome split, and run durations for a deployment. :param deployment_id: ID of the deployment. :param days: Size of the rolling window, in days (1-90, default 30). :param granularity: Bucket width for the returned series, "DAY" (default) or "HOUR". :param time_zone: IANA time zone used to bucket the series (default "UTC"). :returns: Deployment statistics or error message.

The output is automatically stored and can be referenced in other functions. Returns a formatted preview with an object ID (e.g., @obj_123). Use the object store tools in combination with the object ID to view nested properties of the object. Use the returned object ID to pass this result to other functions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
time_zoneNoUTC
granularityNoDAY
deployment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.27

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does add genuinely useful behavioral context: the result is auto-stored in an object store and returned as an object ID (@obj_123) that can be fed into other functions and inspected via object-store tools. What it omits is the read-only nature, any authorization requirements, and whether values are nil for inactive deployments.

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

Conciseness3/5

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

The :param/:returns block is efficient, but the object-store tail is spread over three sentences that partially restate each other ('stored and can be referenced', 'use the object store tools', 'pass this result to other functions'). Front-loading is good, but there is redundancy that could be compressed.

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?

For a 4-param tool with no output schema and no annotations, the definition covers parameters well and explains the important non-obvious behavior that the actual data lives behind an object ID. It is nearly complete; the remaining gap is distinguishing it from the metrics sibling and any dependency on deployment state.

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 description coverage is 0%, so the description must compensate, and it largely does: each of the four params gets a :param line with units, bounds (1-90), defaults (30, DAY, UTC), and the enum values for granularity. This is meaningfully richer than the bare schema titles, though it doesn't explain time_zone's effect on bucket boundaries beyond 'bucket the series'.

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

Purpose4/5

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

The description states a specific verb and resource and enumerates exactly what is returned: query volume, outcome split, and run durations for a deployment. That is a clear purpose. However, it never distinguishes itself from the sibling get_deployment_metrics, which an agent could easily confuse with stats, so it falls short of a 5.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites (e.g., the deployment must be active), and no reference to alternatives such as get_deployment_metrics or get_deployment. The agent is left to infer applicability purely from the tool name.

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