Skip to main content
Glama

create_virtual_key

Encrypt and store a provider API key as a virtual key. Returns a slug for use in prompts and configs, 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
Behavior5/5

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

Beyond annotations, the description discloses key behaviors: encryption of raw key, one-time retrieval at creation, need to save slug, immediate application of optional limits, and return of slug. This adds significant value over the readOnlyHint and destructiveHint 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 sentences front-load the main action and are free of waste. Every sentence adds necessary context: storage action, encryption and slug guidance, and optional limits.

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

Completeness5/5

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

Given the complexity of 11 parameters and existence of an output schema, the description covers the essential workflow: creation, encryption, slug usage, and immediate limit application. It is complete for understanding without needing to explain return values.

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%, so the schema already documents all 11 parameters. The description does not add parameter-specific details, merely reinforces overall behavior. 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?

The description clearly states the tool stores a provider API key as a virtual key, specifying the verb 'store' and resource. It distinguishes from sibling tools like create_api_key by focusing on virtual keys and emphasizing encryption and slug usage.

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

Usage Guidelines4/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, but does not explicitly contrast with alternatives like create_api_key or update_virtual_key. It implies when to use the tool but lacks explicit exclusion 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