Skip to main content
Glama

Portkey MCP by usefulapi

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

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.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, so the bar is lower. The description usefully adds that it is a GET endpoint, that only one metric can be requested at a time, and that a time window is mandatory, but says nothing about return shape (buckets, points), result size, or any rate/limit behavior.

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 tight sentences that front-load the core purpose, then scoping, then the underlying API path. No filler and every clause carries information.

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

Completeness3/5

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

For a 7-parameter tool with no output schema, the description should say more about the returned structure (time buckets, series naming, how multiple scope filters combine). Annotations cover safety and the schema covers inputs, so it is adequate, but the response shape is left entirely unstated.

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 description coverage is 100%, so all seven parameters including the metric enum and total_units bucket sizing are already documented in the schema; baseline 3 applies. The description only echoes the scoping params (virtual keys, configs, metadata) and hints at additional metrics with '…' without adding format or semantics.

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?

States a specific verb and resource: 'Get a time-series analytics graph for a single metric' with metric examples and a time window. The 'single metric' + 'time-series graph' framing implicitly separates it from the sibling portkey_get_analytics_group, but the difference is never made explicit, so an agent must infer which one to pick.

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 conveys context (one metric over a window, optional scoping by virtual keys, configs, metadata) but gives no explicit when-to-use vs when-not, and never names portkey_get_analytics_group as the alternative for aggregated/non-time-series views. Usage is implied rather than stated.

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.