Skip to main content
Glama
Infisical

Infisical MCP Server

Official
by Infisical

create-folder

Create and organize folders in Infisical for structured secret management. Specify folder name, project ID, environment, optional path, and description for efficient organization.

Instructions

Create a new folder in Infisical

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoThe description of the folder to create
environmentYesThe environment to create the folder in (required)
nameYesThe name of the folder to create (required)
pathNoThe path to create the folder in (Defaults to /)
projectIdYesThe project to create the folder in (required)

Implementation Reference

  • Handler for the 'create-folder' tool: validates input using Zod schema, creates the folder via Infisical SDK, and returns the result as text content.
    if (name === AvailableTools.CreateFolder) { const data = createFolderSchema.zod.parse(args); const folder = await infisicalSdk.folders().create({ description: data.description, environment: data.environment, name: data.name, path: data.path, projectId: data.projectId }); return { content: [ { type: "text", text: `Folder created successfully: ${JSON.stringify(folder, null, 3)}` } ] }; }
  • Input schema (Zod and JSON Schema capability) defining parameters for the 'create-folder' tool: projectId, environment, name, path, description.
    const createFolderSchema = { zod: z.object({ description: z.string().optional(), environment: z.string(), name: z.string(), path: z.string().default("/"), projectId: z.string() }), capability: { name: AvailableTools.CreateFolder, description: "Create a new folder in Infisical", inputSchema: { type: "object", properties: { description: { type: "string", description: "The description of the folder to create" }, environment: { type: "string", description: "The environment to create the folder in (required)" }, name: { type: "string", description: "The name of the folder to create (required)" }, path: { type: "string", description: "The path to create the folder in (Defaults to /)" }, projectId: { type: "string", description: "The project to create the folder in (required)" } }, required: ["name", "projectId", "environment"] } } };
  • src/index.ts:452-467 (registration)
    Tool registration in ListToolsRequestSchema handler by including createFolderSchema.capability in the list of available tools.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: [ createSecretSchema.capability, deleteSecretSchema.capability, updateSecretSchema.capability, listSecretsSchema.capability, getSecretSchema.capability, createProjectSchema.capability, createEnvironmentSchema.capability, createFolderSchema.capability, inviteMembersToProjectSchema.capability, listProjectsSchema.capability ] }; });
  • Enum defining all tool names as constants, including CreateFolder = "create-folder", used for matching tool names in handlers and schemas.
    enum AvailableTools { CreateSecret = "create-secret", DeleteSecret = "delete-secret", UpdateSecret = "update-secret", ListSecrets = "list-secrets", GetSecret = "get-secret", CreateProject = "create-project", CreateEnvironment = "create-environment", CreateFolder = "create-folder", InviteMembersToProject = "invite-members-to-project", ListProjects = "list-projects" }

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