get_request_analytics

Get request-volume time-series data with summary.total_requests, summary.successful_requests, summary.failed_requests, and per-bucket total/success/failed counts. Use this for traffic and reliability trends; use get_error_analytics when you only need error counts. Enterprise-gated. Returns 403 on...

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

What get_request_analytics does on Portkey Admin

AI agents call get_request_analytics 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.
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.
ai_org_model string Legacy Portkey query param for provider/model pairs. Format: 'provider__model' with double underscore, e.g. 'openai__gpt-4' or 'anthropic__claude-3-opus'. Comma

Parameters from the server's own tool schema.

Why get_request_analytics needs a policy

Even though get_request_analytics 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 (29 properties)

Questions about get_request_analytics

What does the get_request_analytics tool do? +

Get request-volume time-series data with summary.total_requests, summary.successful_requests, summary.failed_requests, and per-bucket total/success/failed counts. Use this for traffic and reliability trends; use get_error_analytics when you only need error counts. 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_request_analytics accept? +

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

How do I enforce a policy on get_request_analytics? +

Register the Portkey Admin MCP server in PolicyLayer and add a rule for get_request_analytics: 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_request_analytics? +

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

Can I rate-limit get_request_analytics? +

Yes. Add a rate_limit block to the get_request_analytics 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_request_analytics completely? +

Set action: deny in the PolicyLayer policy for get_request_analytics. 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_request_analytics? +

get_request_analytics 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.