Skip to main content
Glama

delete-project

Remove a project by its ID using client authentication. Requires n8n Enterprise license with project management features enabled. Input must be provided as compact JSON.

Instructions

Delete a project by ID. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clientIdYes
projectIdYes

Implementation Reference

  • MCP tool handler for 'delete-project' in the CallToolRequestSchema switch statement. Retrieves the N8nClient instance, validates it exists, calls client.deleteProject(projectId), and returns success or error response.
    case "delete-project": {
      const { clientId, projectId } = args as { clientId: string; projectId: string };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        await client.deleteProject(projectId);
        return {
          content: [{
            type: "text",
            text: `Successfully deleted project with ID: ${projectId}`,
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • N8nClient method that performs the actual DELETE request to the n8n API endpoint /projects/{projectId}.
    async deleteProject(projectId: string): Promise<void> {
      return this.makeRequest<void>(`/projects/${projectId}`, {
        method: 'DELETE',
      });
    }
  • src/index.ts:530-541 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining the name, description, and input schema for 'delete-project'.
    {
      name: "delete-project",
      description: "Delete a project by ID. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          projectId: { type: "string" }
        },
        required: ["clientId", "projectId"]
      }
    },
  • Input schema definition for the 'delete-project' tool, specifying clientId and projectId as required string parameters.
    {
      name: "delete-project",
      description: "Delete a project by ID. NOTE: Requires n8n Enterprise license with project management features enabled. IMPORTANT: Arguments must be provided as compact, single-line JSON without whitespace or newlines.",
      inputSchema: {
        type: "object",
        properties: {
          clientId: { type: "string" },
          projectId: { type: "string" }
        },
        required: ["clientId", "projectId"]
      }
    },

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/fellipesaraiva88/n8n-mcp-server'

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