Skip to main content
Glama

update_virtual_key

Update a Portkey virtual key's name, secret, note, limits, alerts, or mappings to rotate credentials and adjust usage controls.

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.12.2
    • removedInput schema / properties / secret_mappings / items / properties / secret_key / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / secret_mappings / items / properties / secret_key / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. 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"
      +}
  3. Addedv1.0.1
  4. Removed
  5. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Goes beyond the annotations (readOnly=false, destructive=false, openWorld=true, idempotent=false) by disclosing that rotating the key takes effect immediately and that limit changes propagate to downstream prompts and configs using the slug. These are meaningful side-effect disclosures an agent needs before mutating a live key.

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?

Three compact sentences with the core action front-loaded and side effects immediately after. The final sentence restating the return value is mildly redundant given an output schema exists, but nothing is bloated.

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 full schema coverage, annotations, and an output schema, the description supplies the missing behavioral context (immediacy of rotation, downstream propagation) and needn't re-explain parameters or returns. It is essentially complete for a 9-parameter mutation tool.

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 9 parameters in detail. The description echoes only a subset of fields (name, secret, note, limits) and adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

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?

States a specific verb (update) and resource (virtual key) plus the fields it can change (name, secret, note, limits). It is clearly distinct from get_virtual_key, create_virtual_key, and delete_virtual_key by the update verb, though it does not explicitly name an alternative sibling like rotate_api_key.

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?

No when-to-use or when-not-to-use guidance is given. It never tells the agent how this differs from rotate_api_key, update_api_key, or create_virtual_key, so the agent must infer the routing from the name alone.

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