Skip to main content
Glama
Infisical MCP Server

Infisical MCP Server

Official
by Infisical

delete-secret

DestructiveIdempotent

Deletes a secret from a specified Infisical environment and folder path. Call it once per environment to remove a secret everywhere.

Instructions

Delete a secret from one environment and folder. To remove a secret everywhere, call it once per environment.

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": "delete-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 to delete
secretPathNoThe folder path, such as "/" for the root or "/backend/api" for a nested folder. Defaults to "/".
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. Changed4 schema fields changedv0.1.0
    • changedInput schema / properties / environmentSlug / description
      Previous value: -"The slug of the environment to delete the secret from (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 delete the secret from (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 delete (required)"New value: +"The name of the secret to delete"
    • changedInput schema / properties / secretPath / description
      Previous value: -"The path of the secret to delete (Defaults to /)"New value: +"The folder path, such as \"/\" for the root or \"/backend/api\" for a nested folder. Defaults to \"/\"."
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true, and readOnly=false, so the safety profile is covered. The description adds the crucial blast radius - deletion is confined to a single environment and folder - which is behavior beyond structured fields. It does not state irreversibility or what happens when the secret is absent, which would push this to a 5.

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?

Two short sentences, zero waste. The scope statement is front-loaded and the multi-environment caveat follows logically after it.

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 4-parameter mutation with full schema coverage and destructive/idempotent annotations, the description covers purpose, scope, and the repeat-per-environment pattern. With no output schema, it could still mention what a successful deletion returns, but that is a minor omission.

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%, with every parameter documented including the secretPath default of '/'. The description only echoes the environment/folder concept at a high level, so the schema does the heavy lifting; baseline 3 is appropriate.

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 ('delete') and resource ('secret') with an explicit scope qualifier: one environment and one folder. That scoping instantly separates it from create-secret, get-secret, and update-secret without needing to open their schemas.

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?

The second sentence gives real usage context: to remove a secret across all environments, invoke it once per environment. That tells the agent this is a per-environment tool rather than a global purge. It stops short of naming alternatives or stating preconditions such as whether the secret must exist first.

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