Skip to main content
Glama

Create secret

secrets_create

Creates an encrypted secret holding one credential and returns its metadata, without returning the value. Use it to store API keys, OAuth tokens, AWS credentials, or GitHub App credentials for org, project, or user ownership.

Instructions

Creates an encrypted secret holding one credential and returns its metadata. The value is never returned and the owner can't be changed later. Projects can use org- or user-owned secrets only after grant_secrets_add. To change the value, rotate the secret in the dashboard or API.

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": {
      "material": "<material>",
      "name": "<name>",
      "orgID": "<orgID>",
      "owner": "<owner>"
    },
    "name": "secrets_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesHuman-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.
orgIDYesOrganization ID (org_...).
ownerYesWho owns the secret: {"kind":"org"}, {"kind":"project","project_id":"proj_..."}, or {"kind":"user"}. The owner cannot change later.
materialYesThe secret's value. kind selects its shape: generic, oauth_token_set, aws_credentials, or github_app_credentials.
metadataNoArbitrary key-value labels stored with the resource.

Output Schema

NameRequiredDescriptionDefault
idYesIdentifies the secret; other resources reference it by this ID instead of storing the value.
kindYesWhat type of credential the secret holds, which determines its payload fields.
nameYesDisplay name of the secret.
ownerYesWho owns the secret; a project can use it without a grant only if the project owns it.
org_idYesOrganization the secret belongs to.
metadataYesCaller-supplied key-value labels on the secret.
created_atYesWhen the secret was created.
updated_atYesWhen the secret's name, metadata, or current version last changed.
payload_keysYesNames of the fields stored in the current value, such as value or access_token; values are never returned.
management_kindYesWhether the organization manages this secret or the Omnara installation provisions and manages it.
current_version_numberYesVersion of the value currently in use; each rotation increments it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed34 schema fields changedv0.1.10
    • addedInput schema / $defs / AWSCredentialsSecretMaterial / properties / access_key_id / description
      Added value: +"AWS access key ID."
    • changedInput schema / $defs / AWSCredentialsSecretMaterial / properties / external_id / description
      Previous value: -"Requires role_arn."New value: +"External ID sent to STS when assuming role_arn."
    • addedInput schema / $defs / AWSCredentialsSecretMaterial / properties / kind / description
      Added value: +"aws_credentials: AWS access keys used to sign requests with SigV4."
    • addedInput schema / $defs / AWSCredentialsSecretMaterial / properties / role_arn / description
      Added value: +"IAM role to assume through STS before signing."
    • addedInput schema / $defs / AWSCredentialsSecretMaterial / properties / secret_access_key / description
      Added value: +"AWS secret access key."
    • addedInput schema / $defs / AWSCredentialsSecretMaterial / properties / session_token / description
      Added value: +"Session token for temporary credentials. Not refreshed automatically."
    • addedInput schema / $defs / GenericSecretMaterial / properties / kind / description
      Added value: +"generic: a single value, such as an API key."
    • addedInput schema / $defs / GenericSecretMaterial / properties / value / description
      Added value: +"The secret value, up to 64 KiB."
    • addedInput schema / $defs / GitHubAppCredentialsSecretMaterial / properties / app_id / description
      Added value: +"GitHub App ID, not the installation ID."
    • addedInput schema / $defs / GitHubAppCredentialsSecretMaterial / properties / kind / description
      Added value: +"github_app_credentials: a GitHub App's ID, private key, and webhook secret."
    • addedInput schema / $defs / GitHubAppCredentialsSecretMaterial / properties / webhook_secret / description
      Added value: +"The App's webhook secret, used to verify webhook signatures."
    • addedInput schema / $defs / OAuthRefreshSecretMaterial / properties / client_id / description
      Added value: +"OAuth client ID."
    • addedInput schema / $defs / OAuthRefreshSecretMaterial / properties / client_secret / description
      Added value: +"OAuth client secret sent with refresh requests. Omit if the client has none."
    • addedInput schema / $defs / OAuthRefreshSecretMaterial / properties / refresh_token / description
      Added value: +"Refresh token exchanged at token_endpoint for new access tokens."
    • addedInput schema / $defs / OAuthRefreshSecretMaterial / properties / resource / description
      Added value: +"Resource indicator sent with refresh requests."
    • changedInput schema / $defs / OAuthRefreshSecretMaterial / properties / token_endpoint / description
      Previous value: -"Must use HTTPS, except that HTTP is allowed for loopback hosts during local development."New value: +"OAuth token endpoint used to refresh the access token. Must be HTTPS, except for loopback hosts in local development."
    • addedInput schema / $defs / OAuthTokenSetSecretMaterial / properties / access_token / description
      Added value: +"Access token sent to the MCP server; replaced on each refresh."
    • addedInput schema / $defs / OAuthTokenSetSecretMaterial / properties / access_token_expires_in_seconds / description
      Added value: +"Seconds until the access token expires. Omit if it doesn't expire."
    • addedInput schema / $defs / OAuthTokenSetSecretMaterial / properties / id_token / description
      Added value: +"OpenID Connect ID token, if one was issued."
    • addedInput schema / $defs / OAuthTokenSetSecretMaterial / properties / kind / description
      Added value: +"oauth_token_set: OAuth tokens for MCP servers that use oauth auth."
    • addedInput schema / $defs / OAuthTokenSetSecretMaterial / properties / mcp_url / description
      Added value: +"URL of the MCP server the tokens were issued for."
    • addedInput schema / $defs / OAuthTokenSetSecretMaterial / properties / refresh / description
      Added value: +"Refresh material. Without it, the token can't be renewed once it expires."
    • addedInput schema / $defs / OAuthTokenSetSecretMaterial / properties / scopes / description
      Added value: +"Granted scopes, space-separated."
    • addedInput schema / $defs / OAuthTokenSetSecretMaterial / properties / token_type / description
      Added value: +"Token type, such as Bearer."
    • addedInput schema / $defs / OrgSecretOwnerInput / properties / kind / description
      Added value: +"org: owned by the organization. Projects need a grant to use it."
    • addedInput schema / $defs / ProjectSecretOwnerInput / properties / kind / description
      Added value: +"project: owned by one project."
    • addedInput schema / $defs / ProjectSecretOwnerInput / properties / project_id / description
      Added value: +"Owning project."
    • addedInput schema / $defs / UserSecretOwnerInput / properties / kind / description
      Added value: +"user: owned by the calling user, for personal credentials. Projects need a grant to use it."
    • changedInput schema / properties / metadata / description
      Previous value: -"Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 characters, values must be strings of up to 512 characters."New value: +"Arbitrary key-value labels stored with the resource."
    • removedInput schema / properties / metadata / x-go-type
      Removed value: -"resourcemeta.Metadata"
    • removedInput schema / properties / metadata / x-go-type-import
      Removed value: -{
      -  "path": "github.com/omnara-ai/omnara/internal/resourcemeta"
      -}
    • removedInput schema / properties / metadata / x-go-type-skip-optional-pointer
      Removed value: -true
    • removedInput schema / properties / name / x-omnara-unicode-normalization
      Removed value: -"NFC"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ManagementKind": {
      +      "description": "Lifecycle owner. Tenant-managed resources can be changed through tenant APIs. Cluster-managed resources are installed and lifecycle-managed by the control plane; individual APIs may explicitly expose tenant-editable settings.",
      +      "enum": [
      +        "tenant",
      +        "cluster"
      +      ],
      +      "type": "string"
      +    },
      +    "Metadata": {
      +      "additionalProperties": {
      +        "maxLength": 512,
      +        "type": "string"
      +      },
      +      "description": "Arbitrary key-value labels stored with the resource.",
      +      "maxProperties": 16,
      +      "propertyNames": {
      +        "maxLength": 64,
      +        "minLength": 1
      +      },
      +      "type": "object"
      +    },
      +    "OrgSecretOwner": {
      +      "properties": {
      +        "kind": {
      +          "description": "org: the organization owns the secret.",
      +          "enum": [
      +            "org"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "kind"
      +      ],
      +      "type": "object"
      +    },
      +    "OrganizationID": {
      +      "pattern": "^org_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "ProjectID": {
      +      "description": "Project ID (proj_...).",
      +      "pattern": "^proj_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "ProjectSecretOwner": {
      +      "properties": {
      +        "kind": {
      +          "description": "project: a single project owns the secret.",
      +          "enum": [
      +            "project"
      +          ],
      +          "type": "string"
      +        },
      +        "project_id": {
      +          "$ref": "#/$defs/ProjectID",
      +          "description": "Project that owns the secret."
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "project_id"
      +      ],
      +      "type": "object"
      +    },
      +    "ResourceName": {
      +      "description": "Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.",
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "SecretID": {
      +      "description": "Secret ID (sec_...).",
      +      "pattern": "^sec_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "SecretKind": {
      +      "enum": [
      +        "generic",
      +        "oauth_token_set",
      +        "slack_app_credentials",
      +        "aws_credentials",
      +        "github_app_credentials"
      +      ],
      +      "type": "string"
      +    },
      +    "SecretOwner": {
      +      "discriminator": {
      +        "mapping": {
      +          "org": "#/$defs/OrgSecretOwner",
      +          "project": "#/$defs/ProjectSecretOwner",
      +          "user": "#/$defs/UserSecretOwner"
      +        },
      +        "propertyName": "kind"
      +      },
      +      "oneOf": [
      +        {
      +          "$ref": "#/$defs/OrgSecretOwner"
      +        },
      +        {
      +          "$ref": "#/$defs/ProjectSecretOwner"
      +        },
      +        {
      +          "$ref": "#/$defs/UserSecretOwner"
      +        }
      +      ]
      +    },
      +    "Timestamp": {
      +      "format": "date-time",
      +      "type": "string"
      +    },
      +    "UserID": {
      +      "pattern": "^usr_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "UserSecretOwner": {
      +      "properties": {
      +        "kind": {
      +          "description": "user: a user owns the secret.",
      +          "enum": [
      +            "user"
      +          ],
      +          "type": "string"
      +        },
      +        "user_id": {
      +          "$ref": "#/$defs/UserID",
      +          "description": "User who owns the secret."
      +        }
      +      },
      +      "required": [
      +        "kind",
      +        "user_id"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "properties": {
      +    "created_at": {
      +      "$ref": "#/$defs/Timestamp",
      +      "description": "When the secret was created."
      +    },
      +    "current_version_number": {
      +      "description": "Version of the value currently in use; each rotation increments it.",
      +      "format": "int32",
      +      "type": "integer"
      +    },
      +    "id": {
      +      "$ref": "#/$defs/SecretID",
      +      "description": "Identifies the secret; other resources reference it by this ID instead of storing the value."
      +    },
      +    "kind": {
      +      "$ref": "#/$defs/SecretKind",
      +      "description": "What type of credential the secret holds, which determines its payload fields."
      +    },
      +    "management_kind": {
      +      "$ref": "#/$defs/ManagementKind",
      +      "description": "Whether the organization manages this secret or the Omnara installation provisions and manages it."
      +    },
      +    "metadata": {
      +      "$ref": "#/$defs/Metadata",
      +      "description": "Caller-supplied key-value labels on the secret."
      +    },
      +    "name": {
      +      "$ref": "#/$defs/ResourceName",
      +      "description": "Display name of the secret."
      +    },
      +    "org_id": {
      +      "$ref": "#/$defs/OrganizationID",
      +      "description": "Organization the secret belongs to."
      +    },
      +    "owner": {
      +      "$ref": "#/$defs/SecretOwner",
      +      "description": "Who owns the secret; a project can use it without a grant only if the project owns it."
      +    },
      +    "payload_keys": {
      +      "description": "Names of the fields stored in the current value, such as value or access_token; values are never returned.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "updated_at": {
      +      "$ref": "#/$defs/Timestamp",
      +      "description": "When the secret's name, metadata, or current version last changed."
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "org_id",
      +    "management_kind",
      +    "owner",
      +    "name",
      +    "kind",
      +    "metadata",
      +    "current_version_number",
      +    "payload_keys",
      +    "created_at",
      +    "updated_at"
      +  ],
      +  "type": "object"
      +}
  2. Changed4 schema fields changedv0.1.1
    • addedInput schema / $defs / ProjectID / description
      Added value: +"Project ID (proj_...)."
    • addedInput schema / properties / material / description
      Added value: +"The secret's value. kind selects its shape: generic, oauth_token_set, aws_credentials, or github_app_credentials."
    • addedInput schema / properties / orgID / description
      Added value: +"Organization ID (org_...)."
    • addedInput schema / properties / owner / description
      Added value: +"Who owns the secret: {\"kind\":\"org\"}, {\"kind\":\"project\",\"project_id\":\"proj_...\"}, or {\"kind\":\"user\"}. The owner cannot change later."
  3. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare the generic mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false); the description adds genuinely new behavior: the value is never returned, the owner is immutable, and non-owning projects require a grant. It also points to the correct path for changing values, which is exactly the kind of operational detail annotations cannot express.

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?

Four short sentences, each carrying distinct information: what it does, what it returns, invariants, prerequisites, and the alternative for value changes. Nothing is wasted and the core action is front-loaded.

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?

An output schema exists, so return details need not be spelled out, and the description still notes that metadata (not the value) is returned. For a 5-parameter nested-object mutation the coverage is strong, though it stops short of describing metadata or naming the read siblings for verification.

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 owner/material shapes, kinds, and constraints are fully documented in the schema. The description reinforces the immutability of owner and the single-credential nature of a secret but mostly restates what the schema already says, so it adds little beyond baseline.

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 ('Creates an encrypted secret holding one credential') plus the return ('returns its metadata'). It also implicitly separates itself from secrets_update by explaining that value changes go through rotation rather than an update call.

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?

Gives clear context: use this to create, and to change a value rotate in the dashboard or API. It also flags the prerequisite that projects need grant_secrets_add before using org- or user-owned secrets. It does not explicitly name secrets_update as the sibling to avoid, but the rotation note effectively covers that case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.