Skip to main content
Glama

get_analytics_group_a2a

Read-onlyIdempotent

Retrieve paginated per-agent A2A request counts to compare agent traffic volume; requires an Enterprise Portkey plan and returns 403 otherwise.

Instructions

Get a paginated per-agent breakdown with total_groups, group_count, and an agents array containing each A2A (agent-to-agent) agent name and its request count. Use this to see which agents receive the most traffic; use get_analytics_group_mcp for MCP servers instead. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans.

Input Schema

NameRequiredDescriptionDefault
configsNoLegacy Portkey query param for config slugs. Comma-separated string; prefer config_slugs for structured inputs.
span_idNoLegacy Portkey query param for span IDs. Comma-separated string; prefer span_ids for structured inputs.
cost_maxNoMaximum cost in cents to filter by
cost_minNoMinimum cost in cents to filter by
metadataNoLegacy Portkey query param for metadata filtering. Stringified JSON object, e.g. '{"env":"prod","app":"myapp"}'; prefer metadata_filter for structured inputs.
span_idsNoStructured alias for span_id. Use an array of span IDs; normalized to the legacy comma-separated Portkey query param.
trace_idNoLegacy Portkey query param for trace IDs. Comma-separated string; prefer trace_ids for structured inputs.
page_sizeNoResults per page (max 100)
trace_idsNoStructured alias for trace_id. Use an array of trace IDs; normalized to the legacy comma-separated Portkey query param.
api_key_idsNoLegacy Portkey query param for API key UUIDs. Comma-separated string; request_analytics also accepts an array and normalizes it to this form.
prompt_slugNoFilter by prompt slug
status_codeNoLegacy Portkey query param for HTTP status codes. Comma-separated string; prefer status_codes for structured inputs.
ai_org_modelNoLegacy Portkey query param for provider/model pairs. Format: 'provider__model' with double underscore, e.g. 'openai__gpt-4' or 'anthropic__claude-3-opus'. Comma-separated string; prefer provider_models for structured inputs.
config_slugsNoStructured alias for configs. Use an array of config slugs; normalized to the legacy comma-separated Portkey query param.
current_pageNoZero-based page number; the first page is 0
status_codesNoStructured alias for status_code. Use an array of HTTP status codes; normalized to the legacy comma-separated Portkey query param.
virtual_keysNoLegacy Portkey query param for virtual key slugs. Comma-separated string; prefer virtual_key_slugs for structured inputs.
deployment_idNoComma-separated list of deployment IDs (UUIDs) to filter by. Prefer deployment_ids for structured inputs.
deployment_idsNoStructured alias for deployment_id. Use an array of deployment UUIDs; normalized to the comma-separated Portkey query param.
workspace_slugNoFilter by one workspace. Takes precedence over include_all_workspaces and exclude_workspace_slugs when provided.
metadata_filterNoStructured alias for metadata. Use an object such as { env: 'prod' }; normalized to a JSON string before the request is sent.
provider_modelsNoStructured alias for ai_org_model. Use provider__model strings in an array; normalized to the legacy comma-separated Portkey query param.
total_units_maxNoMaximum number of total tokens to filter by
total_units_minNoMinimum number of total tokens to filter by
prompt_token_maxNoMaximum number of prompt tokens
prompt_token_minNoMinimum number of prompt tokens
virtual_key_slugsNoStructured alias for virtual_keys. Use an array of virtual key slugs; normalized to the legacy comma-separated Portkey query param.
completion_token_maxNoMaximum number of completion tokens
completion_token_minNoMinimum number of completion tokens
weighted_feedback_maxNoMaximum weighted feedback score (-10 to 10)
weighted_feedback_minNoMinimum weighted feedback score (-10 to 10)
include_all_workspacesNoAggregate across all organisation workspaces with an organisation API key. Ignored for workspace API keys or when workspace_slug is provided. Supply workspace_slug, include_all_workspaces=true, or exclude_workspace_slugs to choose a scope.
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')
exclude_workspace_slugsNoComma-separated workspace slugs to exclude from organisation-wide analytics, for example ws-legacy,ws-archived. Only applies to organisation API keys; workspace_slug takes precedence.

Output Schema

NameRequiredDescriptionDefault
okYesWhether the tool call succeeded and returned structured data
dataNoStructured success payload when ok is true
errorNoStructured error payload when ok is false

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / exclude_workspace_slugs
      Added value: +{
      +  "description": "Comma-separated workspace slugs to exclude from organisation-wide analytics, for example ws-legacy,ws-archived. Only applies to organisation API keys; workspace_slug takes precedence.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / include_all_workspaces
      Added value: +{
      +  "description": "Aggregate across all organisation workspaces with an organisation API key. Ignored for workspace API keys or when workspace_slug is provided. Supply workspace_slug, include_all_workspaces=true, or exclude_workspace_slugs to choose a scope.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / workspace_slug / description
      Previous value: -"Filter by specific workspace"New value: +"Filter by one workspace. Takes precedence over include_all_workspaces and exclude_workspace_slugs when provided."
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv0.13.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), and the description adds genuinely new behavioral facts: Enterprise gating and a 403 response on non-Enterprise plans. It does not describe pagination semantics or result ordering, which is the remaining gap.

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

Conciseness4/5

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

Three tight sentences, front-loaded with the primary purpose and followed by the routing rule and the access constraint. Slight redundancy in restating response fields given an output schema exists, but nothing is wasted.

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 35-parameter tool with full schema coverage and an output schema, the description covers purpose, sibling routing, and access gating adequately. It omits pagination defaults and workspace-scope selection guidance, but those are documented per-parameter in the schema.

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 coverage is 100% and every parameter carries a description, so the schema does the heavy lifting. The description only implies pagination and filtering at a high level without adding syntax or precedence details beyond the schema (e.g., workspace_slug precedence). Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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 paginated per-agent breakdown') and enumerates the returned shape (total_groups, group_count, agents array with name + request count). It also names the sibling it is not (get_analytics_group_mcp for MCP servers), so an agent can distinguish it without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly names the use case ('see which agents receive the most traffic') and the alternative plus the condition that selects it ('use get_analytics_group_mcp for MCP servers instead'). The Enterprise-only gating and 403 behavior further define when the call is viable.

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

Deploy Server

Other Tools