list_labels
Retrieve all labels or tags from your FreshRSS instance to organize and categorize RSS feed content.
Instructions
List all labels/tags
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/handlers/tag-handlers.ts:42-57 (handler)The handler implementation for the list_labels tool, which fetches labels using client.tags.list() and formats the output string.
wrapTool('list_labels', async () => { const { labels } = await client.tags.list(); if (labels.length === 0) { return textResult('No labels found.'); } const formatted = labels .map((l) => { const unread = l.unreadCount !== undefined ? ` (${l.unreadCount.toString()} unread)` : ''; return `- ${l.name}${unread}`; }) .join('\n'); return textResult(formatted); }) - src/handlers/tag-handlers.ts:36-58 (registration)The MCP tool registration for 'list_labels' within registerTagTools.
server.registerTool( 'list_labels', { description: 'List all labels/tags', inputSchema: z.object({}).strict(), }, wrapTool('list_labels', async () => { const { labels } = await client.tags.list(); if (labels.length === 0) { return textResult('No labels found.'); } const formatted = labels .map((l) => { const unread = l.unreadCount !== undefined ? ` (${l.unreadCount.toString()} unread)` : ''; return `- ${l.name}${unread}`; }) .join('\n'); return textResult(formatted); }) );