Skip to main content
Glama
Infisical MCP Server

Infisical MCP Server

Official
by Infisical

create-secret

Create a new secret in a project environment at the root folder or a named path. Fails if the secret name already exists; use update-secret to change an existing value.

Instructions

Create a new secret in a project environment. It goes in the root folder, which always exists, unless secretPath names another folder; create that folder with create-folder first. Fails if a secret with that name already exists there; use update-secret to change it.

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": {
      "projectId": "<projectId>",
      "environmentSlug": "<environmentSlug>",
      "secretName": "<secretName>"
    },
    "name": "create-secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
projectIdYesThe ID of the project, from list-projects. A project slug or exact project name also works.
secretNameYesThe name of the secret, such as DATABASE_URL
secretPathNoThe folder path, such as "/" for the root or "/backend/api" for a nested folder. Defaults to "/".
secretValueNoThe value of the secret. Defaults to an empty value
environmentSlugYesThe slug of the environment, such as dev, staging or prod. list-projects shows each project's environments. An environment name such as Production also works.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.0
    • changedInput schema / properties / environmentSlug / description
      Previous value: -"The slug of the environment to create the secret in (required)"New value: +"The slug of the environment, such as dev, staging or prod. list-projects shows each project's environments. An environment name such as Production also works."
    • changedInput schema / properties / projectId / description
      Previous value: -"The ID of the project to create the secret in (required)"New value: +"The ID of the project, from list-projects. A project slug or exact project name also works."
    • changedInput schema / properties / secretName / description
      Previous value: -"The name of the secret to create (required)"New value: +"The name of the secret, such as DATABASE_URL"
    • changedInput schema / properties / secretPath / description
      Previous value: -"The path of the secret to create (Defaults to /)"New value: +"The folder path, such as \"/\" for the root or \"/backend/api\" for a nested folder. Defaults to \"/\"."
    • changedInput schema / properties / secretValue / description
      Previous value: -"The value of the secret to create"New value: +"The value of the secret. Defaults to an empty value"
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive, so the safety profile is known. The description adds the important failure mode (duplicate name in the same folder causes failure rather than overwrite) and the folder-existence prerequisite, but says nothing about permissions or whether the value is stored encrypted.

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 short sentences, front-loaded with the operation, then prerequisites, then failure behavior. No redundant restating of the title or the parameter list.

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 a five-parameter mutation tool with no output schema, the description covers what is created, where it lands, what must pre-exist, and what causes failure. Remaining gaps are permission/auth requirements and the shape of the success response, which are minor given the annotations.

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 coverage is 100%, so the baseline is 3, but the description adds a real constraint not present in the schema: the target folder must already exist and the root always exists. That meaningfully informs how secretPath must be set, though it doesn't discuss secretValue handling.

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 new secret') plus scope ('in a project environment'), and explicitly distinguishes itself from create-folder (for non-root paths) and update-secret (for existing secrets). An agent can identify the operation without inspecting the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives conditional routing: the root folder always exists so no preparation is needed, but a custom secretPath requires calling create-folder first; and if the secret already exists, use update-secret instead. Both the prerequisite path and the failing path are covered with named alternatives.

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