Skip to main content
Glama

Get analytics graph

portkey_get_analytics_graph
Read-only

Get a time-series analytics graph for a single metric (cost, requests, tokens, latency, error-rate, cache-hit-rate, …) over a time window. Optionally scope by virtual keys, configs, or metadata. Portkey: GET /analytics/graphs/{metric}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricYesWhich metric graph to return.
configsNoComma-separated config slugs to scope the graph.
metadataNoJSON string of metadata key/values to scope the graph.
total_unitsNoBucket size for the series, e.g. "day" or "hour".
virtual_keysNoComma-separated virtual key slugs to scope the graph.
time_of_generation_maxYesEnd of the window (ISO8601, format YYYY-MM-DDTHH:MM:SS±HH:MM).
time_of_generation_minYesStart of the window (ISO8601, format YYYY-MM-DDTHH:MM:SS±HH:MM).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

The description's 'Get' verb and the 'Portkey: GET /analytics/graphs/{metric}' endpoint align with the readOnlyHint annotation, so there is no contradiction. It does not disclose details like auth requirements, rate limits, or response shape, but the read-only behavioral safety is already carried by the annotation.

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

Conciseness5/5

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

Three concise sentences, with the core purpose front-loaded. The metric examples and endpoint reference are useful and earn their place; there is no redundant or filler phrasing.

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 7-parameter read-only tool with 100% schema coverage and no output schema, the description plus schema gives an agent enough to call it correctly. It could be slightly stronger by noting how it differs from portkey_get_analytics_group or by hinting at the graph response format, but nothing critical is missing.

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?

Input schema description coverage is 100%, so all parameters are already documented structurally. The description adds a readable summary of the metric types and optional scoping fields, but it does not add meaningfully new syntax, defaults, or usage constraints beyond what the schema supplies.

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 action ('Get a time-series analytics graph'), a specific resource ('single metric... over a time window'), and optional scoping dimensions. It is clear and informative, but it does not explicitly differentiate itself from the closely related sibling portkey_get_analytics_group.

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?

Usage context is implied: use this for a single-metric time-series graph with optional filtering. However, there is no explicit when-to-use vs alternatives guidance, and the related analytics sibling tool is never mentioned or ruled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation5/5

Every tool targets a distinct resource or analytics operation; the list/get pairings are standard and clearly separated by resource type. No two tools appear to do the same thing.

Naming Consistency5/5

All tools follow a consistent portkey_<verb>_<resource> pattern using snake_case. The verbs are limited to list, get, and create, and the resource names are consistently ordered.

Tool Count4/5

Sixteen tools is slightly above the ideal 3-15 range, but each tool maps to a distinct resource or endpoint and none feel redundant. The count is manageable for an admin/observability server.

Completeness4/5

The read surface is strong: every major resource has list and get coverage, plus analytics and feedback logging. The main gap is the lack of create/update/delete operations for most managed resources, but for an inspection-focused tool this is a workable limitation.