Skip to main content
Glama
Infisical

Infisical MCP Server

Official
by Infisical

update-secret

Modify secret details in Infisical, including name, value, or path, for a specific project and environment.

Instructions

Update a secret in Infisical

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentSlugYesThe slug of the environment to update the secret in (required)
newSecretNameNoThe new name of the secret to update (Optional)
projectIdYesThe ID of the project to update the secret in (required)
secretNameYesThe current name of the secret to update (required)
secretPathNoThe path of the secret to update (Defaults to /)
secretValueNoThe new value of the secret to update (Optional)

Implementation Reference

  • Handler for the 'update-secret' tool: parses input, calls infisicalSdk.secrets().updateSecret, and returns the updated secret details.
    if (name === AvailableTools.UpdateSecret) {
    	const data = updateSecretSchema.zod.parse(args);
    
    	const { secret } = await infisicalSdk.secrets().updateSecret(data.secretName, {
    		environment: data.environmentSlug,
    		projectId: data.projectId,
    		secretPath: data.secretPath,
    		secretValue: data.secretValue ?? ""
    	});
    
    	return {
    		content: [
    			{
    				type: "text",
    				text: `Secret updated successfully. Updated secret: ${JSON.stringify(secret, null, 3)}`
    			}
    		]
    	};
  • Zod validation schema and MCP capability definition (including inputSchema) for the 'update-secret' tool.
    const updateSecretSchema = {
    	zod: z.object({
    		projectId: z.string(),
    		environmentSlug: z.string(),
    		secretName: z.string(),
    		newSecretName: z.string().optional(),
    		secretValue: z.string().optional(),
    		secretPath: z.string().default("/")
    	}),
    	capability: {
    		name: AvailableTools.UpdateSecret,
    		description: "Update a secret in Infisical",
    		inputSchema: {
    			type: "object",
    			properties: {
    				projectId: {
    					type: "string",
    					description: "The ID of the project to update the secret in (required)"
    				},
    				environmentSlug: {
    					type: "string",
    					description: "The slug of the environment to update the secret in (required)"
    				},
    				secretName: {
    					type: "string",
    					description: "The current name of the secret to update (required)"
    				},
    				newSecretName: {
    					type: "string",
    					description: "The new name of the secret to update (Optional)"
    				},
    				secretValue: {
    					type: "string",
    					description: "The new value of the secret to update (Optional)"
    				},
    				secretPath: {
    					type: "string",
    					description: "The path of the secret to update (Defaults to /)"
    				}
    			},
    			required: ["projectId", "environmentSlug", "secretName"]
    		}
    	}
    };
  • src/index.ts:453-467 (registration)
    Registration of 'update-secret' tool (via updateSecretSchema.capability) in the ListTools response.
    	return {
    		tools: [
    			createSecretSchema.capability,
    			deleteSecretSchema.capability,
    			updateSecretSchema.capability,
    			listSecretsSchema.capability,
    			getSecretSchema.capability,
    			createProjectSchema.capability,
    			createEnvironmentSchema.capability,
    			createFolderSchema.capability,
    			inviteMembersToProjectSchema.capability,
    			listProjectsSchema.capability
    		]
    	};
    });
  • Constant definition for the 'update-secret' tool name in AvailableTools enum.
    UpdateSecret = "update-secret",
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'Update a secret' which implies a mutation operation, but doesn't disclose any behavioral traits like permission requirements, whether the update is reversible, rate limits, or what happens if the secret doesn't exist. This leaves significant gaps for an agent to understand the tool's behavior.

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?

The description is a single, clear sentence with zero wasted words. It's appropriately sized and front-loaded with the essential information about what the tool does.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what the tool returns, what happens on success/failure, or provide any context about the update operation's behavior. For a tool that modifies sensitive data (secrets), this lack of completeness is problematic.

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?

The schema description coverage is 100%, meaning all parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema, so it meets the baseline expectation but doesn't provide extra value.

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?

The description clearly states the action ('Update') and resource ('a secret in Infisical'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'create-secret' or 'delete-secret' in terms of when to use update versus create/delete operations, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'create-secret' or 'delete-secret'. There's no mention of prerequisites, such as needing an existing secret to update, or context about when updating is appropriate versus creating a new secret.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Infisical/infisical-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server