Skip to main content
Glama

list-projects

Retrieve all projects from n8n by providing a client ID. Designed for n8n Enterprise with project management features enabled. Input arguments must be in compact JSON format.

Instructions

List all projects from n8n. 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

Implementation Reference

  • The main handler function for the 'list-projects' tool within the CallToolRequestSchema handler. It retrieves the N8nClient instance using the provided clientId and calls listProjects() on it, returning the list of projects or an error.
    case "list-projects": {
      const { clientId } = args as { clientId: string };
      const client = clients.get(clientId);
      if (!client) {
        return {
          content: [{
            type: "text",
            text: "Client not initialized. Please run init-n8n first.",
          }],
          isError: true
        };
      }
    
      try {
        const projects = await client.listProjects();
        return {
          content: [{
            type: "text",
            text: JSON.stringify(projects.data, null, 2),
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : "Unknown error occurred",
          }],
          isError: true
        };
      }
    }
  • The core helper method in N8nClient class that makes an API request to '/projects' endpoint to list n8n projects.
    async listProjects(): Promise<N8nProjectList> {
      return this.makeRequest<N8nProjectList>('/projects');
    }
  • src/index.ts:508-517 (registration)
    Tool registration in the ListToolsRequestSchema handler, including name, description, and input schema.
      name: "list-projects",
      description: "List all projects from n8n. 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" }
        },
        required: ["clientId"]
      }
    },
  • TypeScript interface defining the structure of the n8n projects list response.
    interface N8nProjectList {
      data: N8nProject[];
      nextCursor?: string;
    }
  • TypeScript interface defining the structure of an individual n8n project.
    interface N8nProject {
      id: string;
      name: string;
      type?: string;
    }
Behavior3/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 adds important context about licensing requirements and input formatting ('Arguments must be provided as compact, single-line JSON'), which are not inferable from the schema. However, it lacks details on pagination, rate limits, error handling, or what the output looks like, leaving gaps for a list operation.

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 front-loaded with the core purpose, followed by essential notes in two concise sentences. Every sentence adds value: the first states the action, the second covers prerequisites, and the third specifies input formatting. There is no wasted text.

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

Completeness3/5

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

Given no annotations, no output schema, and low schema coverage, the description is incomplete. It covers licensing and formatting but misses parameter explanations, output details, and behavioral traits like pagination. For a list tool with one required parameter, this leaves significant gaps, though the prerequisites are adequately addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, and the tool description does not explain what 'clientId' means, its format, or how it affects the listing. The description only mentions argument formatting without clarifying parameter semantics, failing to compensate for the low schema coverage.

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 verb ('List') and resource ('all projects from n8n'), making the purpose explicit. It distinguishes itself from siblings like 'get-workflow' or 'list-users' by specifying projects, though it doesn't explicitly contrast with similar list operations like 'list-workflows' or 'list-tags'.

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 description provides clear context for when to use this tool by stating the prerequisite: 'Requires n8n Enterprise license with project management features enabled.' This helps the agent avoid invoking it inappropriately. However, it does not specify when to use alternatives like 'get-workflow' or 'list-workflows' for non-project resources.

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

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