Skip to main content
Glama
DrBalls

n8n MCP Server

by DrBalls

List n8n Credentials

n8n_list_credentials
Read-onlyIdempotent

Retrieve a list of stored credentials from n8n workflows, showing names and types while excluding sensitive data for security.

Instructions

List all credentials (without sensitive data).

Args:

  • type (string, optional): Filter by credential type (e.g., "slackApi", "httpBasicAuth")

  • limit (number): Maximum results (default: 100)

  • cursor (string, optional): Pagination cursor

Returns: List of credentials with id, name, type, and timestamps. ⚠️ Credential data/secrets are NOT included for security.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoFilter by credential type
limitNoMaximum results to return
cursorNoPagination cursor

Implementation Reference

  • The handler logic for n8n_list_credentials. It fetches credentials from the API based on provided optional filters and formats the response for the user.
    async (params: z.infer<typeof ListCredentialsSchema>) => {
      const queryParams: Record<string, unknown> = { limit: params.limit };
      if (params.type) queryParams.type = params.type;
      if (params.cursor) queryParams.cursor = params.cursor;
      
      const response = await get<N8nPaginatedResponse<N8nCredentialListItem>>('/credentials', queryParams);
      
      const formatted = response.data.map(formatCredential).join('\n\n---\n\n');
      const output = {
        count: response.data.length,
        credentials: response.data,
        nextCursor: response.nextCursor
      };
      
      let text = `Found ${response.data.length} credential(s):\n\n${formatted}`;
      if (response.nextCursor) {
        text += `\n\n_More results available. Use cursor: ${response.nextCursor}_`;
      }
      
      return {
        content: [{ type: 'text', text }],
        structuredContent: output
      };
    }
  • Registration of the 'n8n_list_credentials' tool in the MCP server.
      server.registerTool(
        'n8n_list_credentials',
        {
          title: 'List n8n Credentials',
          description: `List all credentials (without sensitive data).
    
    Args:
      - type (string, optional): Filter by credential type (e.g., "slackApi", "httpBasicAuth")
      - limit (number): Maximum results (default: 100)
      - cursor (string, optional): Pagination cursor
    
    Returns:
      List of credentials with id, name, type, and timestamps.
      ⚠️ Credential data/secrets are NOT included for security.`,
          inputSchema: ListCredentialsSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: false
          }
        },
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false. The description adds valuable context beyond annotations: it explicitly states that credential data/secrets are NOT included for security, which is crucial behavioral information not captured in annotations. No contradictions with annotations.

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 well-structured with clear sections (Args, Returns), uses bullet points efficiently, and every sentence adds value. The security warning is appropriately placed and concise. No wasted words.

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

Completeness5/5

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

For a read-only list tool with comprehensive annotations (readOnlyHint, idempotentHint, etc.) and 100% schema coverage, the description provides complete context. It explains what's returned, what's excluded (sensitive data), and includes parameter examples. No output schema exists, but the Returns section adequately describes the response.

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%, so the schema fully documents all parameters. The description adds minimal value beyond the schema: it provides examples for the 'type' parameter ('slackApi', 'httpBasicAuth') and clarifies the default for 'limit', but these are minor enhancements. Baseline 3 is appropriate when schema does the heavy lifting.

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?

The description clearly states the verb ('List') and resource ('all credentials'), specifies what is excluded ('without sensitive data'), and distinguishes from siblings like n8n_get_credential (which retrieves full credential data). It's specific and unambiguous.

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 implies usage for listing credentials without sensitive data, but doesn't explicitly state when to use this versus alternatives like n8n_get_credential (which includes sensitive data) or n8n_list_workflows. It provides clear context but lacks explicit comparison to sibling tools.

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

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

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