Skip to main content
Glama

create_api_key

Generate API keys for Portkey authentication with configurable scopes, limits, and access levels for users or services.

Instructions

Create a new Portkey API key for authentication. Organisation-level keys provide full access, workspace keys are scoped.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesKey type: 'organisation' for org-wide access or 'workspace' for workspace-scoped
sub_typeYesSub-type: 'user' for user-associated keys or 'service' for service accounts
nameYesDisplay name for the API key
descriptionNoOptional description for the key
workspace_idNoWorkspace ID (required for workspace-type keys)
user_idNoUser ID (required for user sub-type keys)
scopesNoPermission scopes for the key (e.g., ['logs.read', 'analytics.read'])
credit_limitNoCredit limit for usage
alert_thresholdNoAlert threshold percentage (0-100)
rate_limit_rpmNoRate limit in requests per minute
default_config_idNoDefault configuration ID to use with this key
default_metadataNoDefault metadata key-value pairs
alert_emailsNoEmail addresses for alerts
expires_atNoExpiration date in ISO 8601 format
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool creates an API key for authentication and mentions access scopes, but fails to cover critical aspects like required permissions, whether the key is immediately usable, security implications, or rate limits. This leaves significant gaps for a mutation tool.

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?

The description is brief and front-loaded with the core purpose, using only two sentences without unnecessary elaboration. However, it could be slightly more structured by explicitly separating purpose from scope details, though it remains efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex mutation tool with 14 parameters, no annotations, and no output schema, the description is inadequate. It lacks information on authentication requirements, error handling, return values, or security best practices, leaving the agent with insufficient context to use the tool effectively.

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 description coverage is 100%, providing comprehensive parameter documentation. The description adds minimal value beyond the schema by hinting at scope differences ('organisation-level keys provide full access, workspace keys are scoped'), but doesn't elaborate on parameter interactions or usage patterns. Baseline 3 is appropriate given the schema's thoroughness.

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

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and resource ('Portkey API key for authentication'), making the purpose evident. It distinguishes between organisation-level and workspace keys, but doesn't explicitly differentiate from sibling tools like 'create_virtual_key' or 'update_api_key', which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides minimal guidance by mentioning the scope differences between organisation and workspace keys, but lacks explicit when-to-use instructions, prerequisites, or alternatives. No comparison to sibling tools like 'create_virtual_key' or 'list_api_keys' is provided, leaving usage context vague.

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

Install Server

Other Tools

Latest Blog Posts

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/s-b-e-n-s-o-n/portkey-admin-mcp'

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