Portkey MCP by usefulapi
v1.40.4Read AI-gateway analytics, configs, virtual keys, workspaces and users; log request feedback.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
portkey_get_analytics_graph Get analytics graph
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}.
| Parameter | Type | Description |
|---|---|---|
metric * | string | Which metric graph to return. |
time_of_generation_max * | string | End of the window (ISO8601, format YYYY-MM-DDTHH:MM:SS±HH:MM). |
time_of_generation_min * | string | Start of the window (ISO8601, format YYYY-MM-DDTHH:MM:SS±HH:MM). |
configs | string | Comma-separated config slugs to scope the graph. |
metadata | string | JSON string of metadata key/values to scope the graph. |
total_units | string | Bucket size for the series, e.g. "day" or "hour". |
virtual_keys | string | Comma-separated virtual key slugs to scope the graph. |
portkey_get_analytics_group Get analytics group
Get grouped analytics (aggregated by models, users, or metadata) over a time window. Portkey: GET /analytics/groups/{group}.
| Parameter | Type | Description |
|---|---|---|
group * | string | Dimension to group the analytics by. |
time_of_generation_max * | string | End of the window (ISO8601, format YYYY-MM-DDTHH:MM:SS±HH:MM). |
time_of_generation_min * | string | Start of the window (ISO8601, format YYYY-MM-DDTHH:MM:SS±HH:MM). |
current_page | integer | Page number (0-based) for pagination. Default 0. |
page_size | integer | Number of records per page. Default 50. |
portkey_list_configs List configs
List gateway configs (routing/fallback/retry/cache rulesets applied to requests). Portkey: GET /configs.
| Parameter | Type | Description |
|---|---|---|
workspace_id | string | Scope configs to a workspace id/slug. |
portkey_get_config Get config
Get a single gateway config by slug (or id), including its routing rules. Portkey: GET /configs/{slug}.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The config slug or id. |
portkey_list_api_keys List API keys
List API keys in the organization/workspace (metadata only — secrets are never returned). Portkey: GET /api-keys.
| Parameter | Type | Description |
|---|---|---|
current_page | integer | Page number (0-based) for pagination. Default 0. |
page_size | integer | Number of records per page. Default 50. |
workspace_id | string | Scope keys to a workspace id/slug. |
portkey_get_api_key Get API key
Get a single API key's metadata by id (the secret is never returned). Portkey: GET /api-keys/{id}.
| Parameter | Type | Description |
|---|---|---|
id * | string | The API key id. |
portkey_list_virtual_keys List virtual keys
List virtual keys (the aliases that map to provider credentials + budget/rate limits used in requests). Portkey: GET /virtual-keys.
| Parameter | Type | Description |
|---|---|---|
current_page | integer | Page number (0-based) for pagination. Default 0. |
page_size | integer | Number of records per page. Default 50. |
portkey_get_virtual_key Get virtual key
Get a single virtual key by slug, including its provider + limits. Portkey: GET /virtual-keys/{slug}.
| Parameter | Type | Description |
|---|---|---|
slug * | string | The virtual key slug. |
portkey_list_workspaces List workspaces
List workspaces in the organization. Portkey: GET /workspaces.
| Parameter | Type | Description |
|---|---|---|
current_page | integer | Page number (0-based) for pagination. Default 0. |
page_size | integer | Number of records per page. Default 50. |
portkey_get_workspace Get workspace
Get a single workspace by slug/id. Portkey: GET /workspaces/{id}.
| Parameter | Type | Description |
|---|---|---|
id * | string | The workspace slug or id. |
portkey_list_workspace_members List workspace members
List members of a workspace (users + their roles). Portkey: GET /workspaces/{id}/members.
| Parameter | Type | Description |
|---|---|---|
id * | string | The workspace slug or id. |
current_page | integer | Page number (0-based) for pagination. Default 0. |
page_size | integer | Number of records per page. Default 50. |
portkey_list_users List users
List users in the organization. Filter by role or email. Portkey: GET /users.
| Parameter | Type | Description |
|---|---|---|
current_page | integer | Page number (0-based) for pagination. Default 0. |
email | string | Filter users by email address. |
page_size | integer | Number of records per page. Default 50. |
role | string | Filter users by role (e.g. admin, member). |
portkey_get_user Get user
Get a single user by id. Portkey: GET /users/{id}.
| Parameter | Type | Description |
|---|---|---|
id * | string | The user id. |
portkey_list_user_invites List user invites
List pending user invitations to the organization. Portkey: GET /user-invites.
| Parameter | Type | Description |
|---|---|---|
current_page | integer | Page number (0-based) for pagination. Default 0. |
page_size | integer | Number of records per page. Default 50. |
portkey_list_audit_logs List audit logs
List audit log entries (admin actions across the organization). Portkey: GET /audit-logs.
| Parameter | Type | Description |
|---|---|---|
current_page | integer | Page number (0-based) for pagination. Default 0. |
page_size | integer | Number of records per page. Default 50. |
portkey_create_feedback Create feedback
WRITES a feedback record into the Portkey account, attached to a request/trace by trace_id. Use for logging a quality score (typically -10..10) with an optional weight (0..1) and metadata. Portkey: POST /feedback.
| Parameter | Type | Description |
|---|---|---|
trace_id * | string | The request/trace id to attach feedback to. |
value * | number | Feedback score, typically -10..10. |
metadata | object | Arbitrary metadata key/values. |
weight | number | Relative weight of this feedback, 0..1. |