Skip to main content
Glama

update_virtual_key

Modify a virtual key's name, secret, note, or usage limits without recreating it. Changes apply immediately to downstream prompts and configs using the same slug.

Instructions

Update a virtual key's name, secret, note, or limits. Rotating the key takes effect immediately, and limit changes apply to downstream prompts and configs using this slug. Returns success when Portkey accepts the update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoNew provider API key value
nameNoNew display name for the key
noteNoNew note or description
slugYesThe slug of the virtual key to update
credit_limitNoNew credit limit for usage
rate_limit_rpmNoNew rate limit in requests per minute
alert_thresholdNoNew alert threshold percentage (0-100)
secret_mappingsNoReplacement Secret Reference mappings
deployment_configurationsNoReplacement Azure deployment configurations

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.11.5
    • addedInput schema / properties / deployment_configurations
      Added value: +{
      +  "description": "Replacement Azure deployment configurations",
      +  "items": {
      +    "properties": {
      +      "alias": {
      +        "description": "Optional model alias for the deployment",
      +        "type": "string"
      +      },
      +      "api_version": {
      +        "description": "Azure OpenAI API version",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "deployment_name": {
      +        "description": "Azure deployment name",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "is_default": {
      +        "description": "Whether this is the default Azure deployment",
      +        "type": "boolean"
      +      }
      +    },
      +    "required": [
      +      "api_version",
      +      "deployment_name"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / secret_mappings
      Added value: +{
      +  "description": "Replacement Secret Reference mappings",
      +  "items": {
      +    "properties": {
      +      "secret_key": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Optional key selected from a structured external secret"
      +      },
      +      "secret_reference_id": {
      +        "description": "Secret Reference ID that owns the external secret",
      +        "type": "string"
      +      },
      +      "target_field": {
      +        "description": "Virtual Key field populated from the Secret Reference",
      +        "type": "string"
      +      },
      +      "value_format": {
      +        "anyOf": [
      +          {
      +            "enum": [
      +              "json",
      +              "string"
      +            ],
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "Whether Portkey reads the mapped value as JSON or a string"
      +      }
      +    },
      +    "required": [
      +      "target_field",
      +      "secret_reference_id"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Addedv1.0.1
  3. Removed
  4. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already mark readOnlyHint=false, so the description does not need to state it is a write operation. The description adds valuable behavioral details: rotating the key takes effect immediately, limit changes apply to downstream prompts and configs, and success indicates Portkey accepted the update. It also implies that the operation is not idempotent by mentioning immediate effects. No contradiction with 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?

The description is three sentences long, with the core action first, then immediate-effect behavior, then the success criterion. Every sentence contributes useful information: what can be updated, how changes propagate, and what the return indicates. No fluff or repetition.

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 a rich input schema covering all 9 parameters and an output schema present, the description need not repeat parameter details. It provides the critical contextual facts about timing (immediate rotation) and propagation (downstream prompts/configs) that are not inferable from the schema. Slight gap: it does not mention idempotency or partial-update behavior, but the openWorldHint and schema's optional fields partially cover that. Overall complete enough for an agent to invoke correctly.

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 every parameter is already documented in the schema. The description adds a high-level summary of the key groups (name, secret, note, or limits) but does not add meaning beyond the schema. Baseline 3 is appropriate given the schema carries the detailed semantics, including nested objects like secret_mappings and deployment_configurations.

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 states a specific verb and resource: 'Update a virtual key's name, secret, note, or limits.' It clearly indicates the tool modifies an existing virtual key. It does not explicitly differentiate itself from sibling tools like create_virtual_key or delete_virtual_key, but the update semantics and the mention of slug-based targeting provide adequate clarity.

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 gives useful context for when to use this tool: updating an existing virtual key identified by slug, with immediate effect for rotation and propagation of limit changes. It does not explicitly state 'use create_virtual_key for new keys' or 'use delete_virtual_key to remove,' but the update-focused language clearly implies the intended scenario. Slight gap: no explicit exclusion of alternatives, but context is sufficient.

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