Skip to main content
Glama

create_secret_reference

Create a reference to a secret stored in AWS Secrets Manager, Azure Key Vault, or HashiCorp Vault and return its UUID and slug without exposing the resolved secret.

Instructions

Create a reference to a secret stored in AWS Secrets Manager, Azure Key Vault, or HashiCorp Vault. Authentication credentials are sent to Portkey and exposed to this MCP transcript; use short-lived or workload identity modes when possible. Returns the new UUID and slug, never the resolved external secret.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "manager_type": "<manager_type>",
      "auth_config": "<auth_config>",
      "secret_path": "<secret_path>"
    },
    "name": "create_secret_reference"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable name
slugNoOptional stable slug containing only letters, numbers, underscores, or hyphens; Portkey generates one when omitted
tagsNoOptional string key-value tags for filtering and organization
secret_keyNoOptional key within a structured external secret; null uses the whole secret value
auth_configYesChoose exactly one documented authentication shape matching manager_type. Credentials are sent to Portkey and visible in the MCP transcript; prefer workload identity or short-lived credentials when available.
descriptionNoOptional description; use null to leave it empty
secret_pathYesPath of the secret in the external secret manager
manager_typeYesExternal secret manager: aws_sm for AWS Secrets Manager, azure_kv for Azure Key Vault, or hashicorp_vault for HashiCorp Vault; must match the auth_config field family
organisation_idNoOrganisation UUID; required when the MCP server is not authenticated with a Portkey API key
allowed_workspacesNoWorkspace UUIDs or slugs allowed to use this reference; omit when allow_all_workspaces is true
allow_all_workspacesNoWhether every workspace may use this reference; defaults to true and cannot be true with allowed_workspaces

Output Schema

NameRequiredDescriptionDefault
okYesCall succeeded
dataNoSuccess payload
errorNoFailure details

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.16.5
    • changedOutput schema / properties / data / description
      Previous value: -"Structured success payload when ok is true"New value: +"Success payload"
    • changedOutput schema / properties / error / description
      Previous value: -"Structured error payload when ok is false"New value: +"Failure details"
    • changedOutput schema / properties / error / properties / details / description
      Previous value: -"Optional structured error details"New value: +"Extra error details"
    • changedOutput schema / properties / error / properties / message / description
      Previous value: -"Human-readable error message"New value: +"Error message"
    • changedOutput schema / properties / ok / description
      Previous value: -"Whether the tool call succeeded and returned structured data"New value: +"Call succeeded"
  2. 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"
  3. Changed1 schema field changedv0.12.2
    • changedInput schema / properties / auth_config / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "aws_access_key_id": {
      -        "description": "AWS access key ID; required when aws_auth_type is accessKey",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "aws_auth_type": {
      -        "const": "accessKey",
      -        "description": "Use an AWS access key ID and secret access key",
      -        "type": "string"
      -      },
      -      "aws_region": {
      -        "description": "AWS region containing the secret, for example us-east-1",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "aws_secret_access_key": {
      -        "description": "AWS secret access key; required when aws_auth_type is accessKey and exposed to the MCP transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "aws_auth_type",
      -      "aws_access_key_id",
      -      "aws_secret_access_key",
      -      "aws_region"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "aws_auth_type": {
      -        "const": "assumedRole",
      -        "description": "Assume the specified AWS IAM role",
      -        "type": "string"
      -      },
      -      "aws_external_id": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "Optional external ID required by the target IAM role"
      -      },
      -      "aws_region": {
      -        "description": "AWS region containing the secret, for example us-east-1",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "aws_role_arn": {
      -        "description": "IAM role ARN to assume; required when aws_auth_type is assumedRole",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "aws_auth_type",
      -      "aws_role_arn",
      -      "aws_region"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "aws_auth_type": {
      -        "const": "serviceRole",
      -        "description": "Use the AWS workload or service role available at runtime",
      -        "type": "string"
      -      },
      -      "aws_region": {
      -        "description": "Optional AWS region containing the secret, for example us-east-1",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "aws_auth_type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "azure_auth_mode": {
      -        "const": "entra",
      -        "description": "Authenticate with a Microsoft Entra application client secret",
      -        "type": "string"
      -      },
      -      "azure_entra_client_id": {
      -        "description": "Microsoft Entra application client ID; required for entra authentication",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "azure_entra_client_secret": {
      -        "description": "Microsoft Entra client secret; required for entra authentication and exposed to the MCP transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "azure_entra_tenant_id": {
      -        "description": "Microsoft Entra tenant ID; required for entra authentication",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "azure_vault_url": {
      -        "description": "Azure Key Vault URL, for example https://example.vault.azure.net",
      -        "format": "uri",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "azure_auth_mode",
      -      "azure_entra_tenant_id",
      -      "azure_entra_client_id",
      -      "azure_entra_client_secret",
      -      "azure_vault_url"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "azure_auth_mode": {
      -        "const": "managed",
      -        "description": "Authenticate with an Azure managed identity",
      -        "type": "string"
      -      },
      -      "azure_managed_client_id": {
      -        "description": "Optional client ID of a user-assigned managed identity; omit for the system-assigned identity",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "azure_vault_url": {
      -        "description": "Azure Key Vault URL, for example https://example.vault.azure.net",
      -        "format": "uri",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "azure_auth_mode",
      -      "azure_vault_url"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "azure_auth_mode": {
      -        "const": "default",
      -        "description": "Use Azure's default runtime credential chain",
      -        "type": "string"
      -      },
      -      "azure_vault_url": {
      -        "description": "Azure Key Vault URL, for example https://example.vault.azure.net",
      -        "format": "uri",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "azure_auth_mode",
      -      "azure_vault_url"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "vault_addr": {
      -        "description": "Base URL of the HashiCorp Vault server",
      -        "format": "uri",
      -        "type": "string"
      -      },
      -      "vault_auth_type": {
      -        "const": "token",
      -        "description": "Authenticate to HashiCorp Vault with a token",
      -        "type": "string"
      -      },
      -      "vault_namespace": {
      -        "description": "Optional HashiCorp Vault Enterprise namespace",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "vault_token": {
      -        "description": "HashiCorp Vault token; required for token authentication and exposed to the MCP transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "vault_auth_type",
      -      "vault_addr",
      -      "vault_token"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "vault_addr": {
      -        "description": "Base URL of the HashiCorp Vault server",
      -        "format": "uri",
      -        "type": "string"
      -      },
      -      "vault_auth_type": {
      -        "const": "approle",
      -        "description": "Authenticate to HashiCorp Vault with AppRole credentials",
      -        "type": "string"
      -      },
      -      "vault_namespace": {
      -        "description": "Optional HashiCorp Vault Enterprise namespace",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "vault_role_id": {
      -        "description": "HashiCorp Vault AppRole role ID; required for approle authentication",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "vault_secret_id": {
      -        "description": "HashiCorp Vault AppRole secret ID; required for approle authentication and exposed to the MCP transcript",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "vault_auth_type",
      -      "vault_addr",
      -      "vault_role_id",
      -      "vault_secret_id"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "vault_addr": {
      -        "description": "Base URL of the HashiCorp Vault server",
      -        "format": "uri",
      -        "type": "string"
      -      },
      -      "vault_auth_type": {
      -        "const": "kubernetes",
      -        "description": "Authenticate to HashiCorp Vault with a Kubernetes service account",
      -        "type": "string"
      -      },
      -      "vault_namespace": {
      -        "description": "Optional HashiCorp Vault Enterprise namespace",
      -        "minLength": 1,
      -        "type": "string"
      -      },
      -      "vault_role": {
      -        "description": "HashiCorp Vault Kubernetes auth role name",
      -        "minLength": 1,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "vault_auth_type",
      -      "vault_addr",
      -      "vault_role"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "aws_access_key_id": {
      +        "description": "AWS access key ID; required when aws_auth_type is accessKey",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "aws_auth_type": {
      +        "const": "accessKey",
      +        "description": "Use an AWS access key ID and secret access key",
      +        "type": "string"
      +      },
      +      "aws_region": {
      +        "description": "AWS region containing the secret, for example us-east-1",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "aws_secret_access_key": {
      +        "description": "AWS secret access key; required when aws_auth_type is accessKey and exposed to the MCP transcript",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "aws_auth_type",
      +      "aws_access_key_id",
      +      "aws_secret_access_key",
      +      "aws_region"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "aws_auth_type": {
      +        "const": "assumedRole",
      +        "description": "Assume the specified AWS IAM role",
      +        "type": "string"
      +      },
      +      "aws_external_id": {
      +        "description": "Optional external ID required by the target IAM role",
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "aws_region": {
      +        "description": "AWS region containing the secret, for example us-east-1",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "aws_role_arn": {
      +        "description": "IAM role ARN to assume; required when aws_auth_type is assumedRole",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "aws_auth_type",
      +      "aws_role_arn",
      +      "aws_region"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "aws_auth_type": {
      +        "const": "serviceRole",
      +        "description": "Use the AWS workload or service role available at runtime",
      +        "type": "string"
      +      },
      +      "aws_region": {
      +        "description": "Optional AWS region containing the secret, for example us-east-1",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "aws_auth_type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "azure_auth_mode": {
      +        "const": "entra",
      +        "description": "Authenticate with a Microsoft Entra application client secret",
      +        "type": "string"
      +      },
      +      "azure_entra_client_id": {
      +        "description": "Microsoft Entra application client ID; required for entra authentication",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "azure_entra_client_secret": {
      +        "description": "Microsoft Entra client secret; required for entra authentication and exposed to the MCP transcript",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "azure_entra_tenant_id": {
      +        "description": "Microsoft Entra tenant ID; required for entra authentication",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "azure_vault_url": {
      +        "description": "Azure Key Vault URL, for example https://example.vault.azure.net",
      +        "format": "uri",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "azure_auth_mode",
      +      "azure_entra_tenant_id",
      +      "azure_entra_client_id",
      +      "azure_entra_client_secret",
      +      "azure_vault_url"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "azure_auth_mode": {
      +        "const": "managed",
      +        "description": "Authenticate with an Azure managed identity",
      +        "type": "string"
      +      },
      +      "azure_managed_client_id": {
      +        "description": "Optional client ID of a user-assigned managed identity; omit for the system-assigned identity",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "azure_vault_url": {
      +        "description": "Azure Key Vault URL, for example https://example.vault.azure.net",
      +        "format": "uri",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "azure_auth_mode",
      +      "azure_vault_url"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "azure_auth_mode": {
      +        "const": "default",
      +        "description": "Use Azure's default runtime credential chain",
      +        "type": "string"
      +      },
      +      "azure_vault_url": {
      +        "description": "Azure Key Vault URL, for example https://example.vault.azure.net",
      +        "format": "uri",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "azure_auth_mode",
      +      "azure_vault_url"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "vault_addr": {
      +        "description": "Base URL of the HashiCorp Vault server",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "vault_auth_type": {
      +        "const": "token",
      +        "description": "Authenticate to HashiCorp Vault with a token",
      +        "type": "string"
      +      },
      +      "vault_namespace": {
      +        "description": "Optional HashiCorp Vault Enterprise namespace",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "vault_token": {
      +        "description": "HashiCorp Vault token; required for token authentication and exposed to the MCP transcript",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "vault_auth_type",
      +      "vault_addr",
      +      "vault_token"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "vault_addr": {
      +        "description": "Base URL of the HashiCorp Vault server",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "vault_auth_type": {
      +        "const": "approle",
      +        "description": "Authenticate to HashiCorp Vault with AppRole credentials",
      +        "type": "string"
      +      },
      +      "vault_namespace": {
      +        "description": "Optional HashiCorp Vault Enterprise namespace",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "vault_role_id": {
      +        "description": "HashiCorp Vault AppRole role ID; required for approle authentication",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "vault_secret_id": {
      +        "description": "HashiCorp Vault AppRole secret ID; required for approle authentication and exposed to the MCP transcript",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "vault_auth_type",
      +      "vault_addr",
      +      "vault_role_id",
      +      "vault_secret_id"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "vault_addr": {
      +        "description": "Base URL of the HashiCorp Vault server",
      +        "format": "uri",
      +        "type": "string"
      +      },
      +      "vault_auth_type": {
      +        "const": "kubernetes",
      +        "description": "Authenticate to HashiCorp Vault with a Kubernetes service account",
      +        "type": "string"
      +      },
      +      "vault_namespace": {
      +        "description": "Optional HashiCorp Vault Enterprise namespace",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "vault_role": {
      +        "description": "HashiCorp Vault Kubernetes auth role name",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "vault_auth_type",
      +      "vault_addr",
      +      "vault_role"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. Addedv0.5.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true), and the description adds two things the annotations cannot: a warning that credentials are transmitted to Portkey and visible in the transcript, and the guarantee that only the UUID/slug come back, never the resolved external secret. It does not disclose whether creation validates connectivity to the external vault or what happens on auth failure, but the credential-exposure warning is the highest-value disclosure for this tool.

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 tight sentences: what it creates, the security consequence of doing so, and what comes back. The exposure warning is placed immediately after the purpose statement, so the most decision-relevant information is front-loaded with no filler.

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?

For an 11-parameter tool with a complex polymorphic auth schema and an output schema, the description covers purpose, credential-sensitivity, and return shape adequately. The remaining gap is operational behavior on failure or validation of the remote secret, which an agent may want before calling.

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 description coverage is 100%, so the baseline is 3, but the description adds a selection heuristic for the large nine-way auth_config union by steering toward short-lived or workload identity modes. It does not explain secret_key, secret_path, or workspace scoping semantics beyond the schema, so it is an addition rather than a replacement.

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?

States a specific verb and resource ('Create a reference to a secret') plus the exact external systems supported (AWS Secrets Manager, Azure Key Vault, HashiCorp Vault). This clearly separates it from sibling tools like create_api_key or create_integration, which deal with other credential types.

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 gives security-oriented guidance ('use short-lived or workload identity modes when possible'), which helps choose between the auth_config shapes. However, it never says when to use this tool versus update_secret_reference or create_api_key, so usage relative to alternatives is only implied.

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