get_analytics_group_users

Get a paginated per-user breakdown with total_groups, group_count, and a users array containing request count, cost, and token usage. Use this for billing, audits, or top-consumer analysis; use get_users_analytics for aggregate active and new user trends. Enterprise-gated. Returns 403 on non-Ente...

Server Portkey Admin CodesWhat/portkey-admin-mcp
Category Read
Risk class Low
Parameters 120 required

What get_analytics_group_users does on Portkey Admin

AI agents call get_analytics_group_users to retrieve information from Portkey Admin without modifying anything — typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

ParameterTypeRequiredDescription
configs string Legacy Portkey query param for config slugs. Comma-separated string; prefer config_slugs for structured inputs.
span_id string Legacy Portkey query param for span IDs. Comma-separated string; prefer span_ids for structured inputs.
cost_max number Maximum cost in cents to filter by
cost_min number Minimum cost in cents to filter by
metadata string Legacy Portkey query param for metadata filtering. Stringified JSON object, e.g. '{"env":"prod","app":"myapp"}'; prefer metadata_filter for structured inputs.
span_ids array Structured alias for span_id. Use an array of span IDs; normalized to the legacy comma-separated Portkey query param.
trace_id string Legacy Portkey query param for trace IDs. Comma-separated string; prefer trace_ids for structured inputs.
page_size integer Results per page (max 100)
trace_ids array Structured alias for trace_id. Use an array of trace IDs; normalized to the legacy comma-separated Portkey query param.
api_key_ids string Legacy Portkey query param for API key UUIDs. Comma-separated string; request_analytics also accepts an array and normalizes it to this form.
prompt_slug string Filter by prompt slug
status_code string Legacy Portkey query param for HTTP status codes. Comma-separated string; prefer status_codes for structured inputs.

Parameters from the server's own tool schema.

Why get_analytics_group_users needs a policy

Even though get_analytics_group_users only reads data, uncontrolled read access leaks sensitive information and racks up API costs — an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.

Risk signalsHigh parameter count (31 properties)

Questions about get_analytics_group_users

What does the get_analytics_group_users tool do? +

Get a paginated per-user breakdown with total_groups, group_count, and a users array containing request count, cost, and token usage. Use this for billing, audits, or top-consumer analysis; use get_users_analytics for aggregate active and new user trends. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans. It is categorised as a Read tool in the Portkey Admin MCP Server, which means it retrieves data without modifying state.

What parameters does get_analytics_group_users accept? +

get_analytics_group_users accepts 12 parameters: configs, span_id, cost_max, cost_min, metadata, span_ids, trace_id, page_size, trace_ids, api_key_ids, prompt_slug, status_code. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on get_analytics_group_users? +

Register the Portkey Admin MCP server in PolicyLayer and add a rule for get_analytics_group_users: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Portkey Admin. Nothing to install.

What risk level is get_analytics_group_users? +

get_analytics_group_users is a Read tool with low risk. Read-only tools are generally safe to allow by default.

Can I rate-limit get_analytics_group_users? +

Yes. Add a rate_limit block to the get_analytics_group_users rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block get_analytics_group_users completely? +

Set action: deny in the PolicyLayer policy for get_analytics_group_users. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides get_analytics_group_users? +

get_analytics_group_users is provided by the Portkey Admin MCP server (CodesWhat/portkey-admin-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.