Skip to main content
Glama

Portkey MCP Server

by r-huijts

get_user_stats

Retrieve user activity analytics, including request counts and costs, within a specified time range. Filter by cost, units, status codes, or virtual keys to monitor and manage API usage effectively.

Instructions

Retrieve detailed analytics data about user activity within a specified time range, including request counts and costs

Input Schema

NameRequiredDescriptionDefault
cost_maxNoMaximum cost in cents to filter by
cost_minNoMinimum cost in cents to filter by
page_sizeNoNumber of results per page (for pagination)
status_codeNoFilter by specific HTTP status codes (comma-separated)
time_of_generation_maxYesEnd time for the analytics period (ISO8601 format, e.g., '2024-02-01T00:00:00Z')
time_of_generation_minYesStart time for the analytics period (ISO8601 format, e.g., '2024-01-01T00:00:00Z')
total_units_maxNoMaximum number of total tokens to filter by
total_units_minNoMinimum number of total tokens to filter by
virtual_keysNoFilter by specific virtual key slugs (comma-separated)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "cost_max": { "description": "Maximum cost in cents to filter by", "exclusiveMinimum": 0, "type": "number" }, "cost_min": { "description": "Minimum cost in cents to filter by", "exclusiveMinimum": 0, "type": "number" }, "page_size": { "description": "Number of results per page (for pagination)", "exclusiveMinimum": 0, "type": "number" }, "status_code": { "description": "Filter by specific HTTP status codes (comma-separated)", "type": "string" }, "time_of_generation_max": { "description": "End time for the analytics period (ISO8601 format, e.g., '2024-02-01T00:00:00Z')", "type": "string" }, "time_of_generation_min": { "description": "Start time for the analytics period (ISO8601 format, e.g., '2024-01-01T00:00:00Z')", "type": "string" }, "total_units_max": { "description": "Maximum number of total tokens to filter by", "exclusiveMinimum": 0, "type": "number" }, "total_units_min": { "description": "Minimum number of total tokens to filter by", "exclusiveMinimum": 0, "type": "number" }, "virtual_keys": { "description": "Filter by specific virtual key slugs (comma-separated)", "type": "string" } }, "required": [ "time_of_generation_min", "time_of_generation_max" ], "type": "object" }

You must be authenticated.

Other Tools from Portkey MCP Server

Related Tools

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/r-huijts/portkey-admin-mcp-server'

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