Skip to main content
Glama

update_virtual_key

Modify a virtual key's name, secret, note, or usage and rate limits; rotate credentials immediately and apply limit changes to downstream prompts and configs.

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

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

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 changedv1.0.9
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. 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"
      +]
  3. 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"
      +}
  4. Addedv1.0.1
  5. Removed
  6. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, so the safety profile is covered; the description adds genuinely new behavioral context: rotation propagates immediately and limit changes affect downstream prompts and configs bound to this slug. That blast-radius disclosure is exactly the kind of thing annotations cannot express. It stops short of describing partial-update semantics or what happens to fields not supplied.

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 short sentences, front-loaded with the action and its target, then consequences. Nearly every clause earns its place; the closing "Returns success when Portkey accepts the update" is the weakest, since an output schema already exists and the phrase adds little actionable signal.

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 an output schema present, return values need no explanation, and the description covers the two things structured data cannot easily convey: immediate propagation of rotation and downstream impact of limit changes. It omits partial-vs-full update semantics and the replacement nature of secret_mappings/deployment_configurations, which matters for a non-idempotent mutation.

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 one of the nine parameters is already documented in the schema; the description adds no format, constraint, or interaction detail beyond restating four field names. Baseline 3 applies since the schema carries the load, and the description does not compensate for the two array parameters whose replace-wholesale behavior is the least obvious part of the contract.

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 and resource ("Update a virtual key") and enumerates the mutable facets (name, secret, note, limits), so the agent immediately knows this is the mutation counterpart to create_virtual_key/get_virtual_key/delete_virtual_key. It does not explicitly name or exclude a sibling, and the field list is incomplete relative to the schema (secret_mappings and deployment_configurations are omitted), which keeps it just short of a 5.

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?

Usage is implied by the name and by the note that rotating takes effect immediately, but there is no explicit guidance on when to use this versus create_virtual_key (new key) or delete_virtual_key, nor any stated prerequisites such as required permissions. The agent has to infer the selection rule from the verb 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