List n8n Tags
n8n_list_tagsRetrieve all available tags for organizing workflows in n8n, with pagination support for managing large collections.
Instructions
List all tags available for organizing workflows.
Args:
limit (number): Maximum results (default: 100)
cursor (string, optional): Pagination cursor
Returns: List of tags with id and name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum results to return | |
| cursor | No | Pagination cursor |
Implementation Reference
- src/tools/tags.ts:41-63 (handler)The handler function for 'n8n_list_tags', which calls the '/tags' API endpoint to list all available tags.
async (params: z.infer<typeof ListTagsSchema>) => { const queryParams: Record<string, unknown> = { limit: params.limit }; if (params.cursor) queryParams.cursor = params.cursor; const response = await get<N8nPaginatedResponse<N8nTag>>('/tags', queryParams); const formatted = response.data.map(formatTag).join('\n'); const output = { count: response.data.length, tags: response.data, nextCursor: response.nextCursor }; let text = `Found ${response.data.length} tag(s):\n\n${formatted}`; if (response.nextCursor) { text += `\n\n_More results available. Use cursor: ${response.nextCursor}_`; } return { content: [{ type: 'text', text }], structuredContent: output }; } - src/tools/tags.ts:21-40 (registration)Registration of the 'n8n_list_tags' tool with the MCP server, defining its schema, title, and description.
server.registerTool( 'n8n_list_tags', { title: 'List n8n Tags', description: `List all tags available for organizing workflows. Args: - limit (number): Maximum results (default: 100) - cursor (string, optional): Pagination cursor Returns: List of tags with id and name.`, inputSchema: ListTagsSchema, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } },