Skip to main content
Glama

create_virtual_key

Securely store a provider API key as an encrypted virtual key. Returns a unique slug for use in prompts and configurations, with optional usage and rate limits.

Instructions

Store a provider API key as a virtual key. The raw key is encrypted and only returned at creation time, so save the returned slug and use it in prompts/configs. Optional usage and rate limits apply immediately, and the tool returns the new slug.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDisplay name for the virtual key
providerYesProvider slug (e.g., 'openai', 'anthropic', 'azure-openai', 'google')
keyYesThe actual provider API key to store
noteNoOptional note or description for this key
workspace_idNoWorkspace ID to create the key in
api_versionNoAPI version (for Azure OpenAI)
resource_nameNoResource name (for Azure OpenAI)
deployment_nameNoDeployment name (for Azure OpenAI)
credit_limitNoMaximum usage cost threshold
alert_thresholdNoPercentage of credit_limit at which to send alert emails (0-100)
rate_limit_rpmNoRequests per minute limit

Output Schema

TableJSON 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
Behavior4/5

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

Annotations provide safety hints, but description adds value: encryption, one-time return of raw key, immediate application of limits. These behaviors are not in annotations.

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

Conciseness5/5

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

Three concise sentences, action first, no wasted words. Efficiently communicates key facts.

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?

With output schema present, return value explanation is sufficient. Description covers security, slug usage, and immediate limit enforcement. Minor gap: no error handling info, but completeness is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. Description clarifies that optional usage/rate limits apply immediately, adding behavioral context beyond schema descriptions.

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?

The description clearly states the tool stores a provider API key as a virtual key, specifying encryption, slug return, and optional limits. It distinguishes from siblings like create_api_key by focusing on virtual keys and encryption.

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

Usage Guidelines3/5

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

The description advises to save the returned slug for use in prompts/configs, which is helpful but lacks explicit when-to-use vs alternatives (e.g., create_api_key). No exclusion or alternative guidance.

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