add_labels
Assign custom labels to FreshRSS articles for better organization and categorization of your RSS feed content.
Instructions
Add labels to articles
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| articleIds | Yes | Article IDs to modify | |
| labels | Yes | Label names to add/remove |
Implementation Reference
- src/handlers/tag-handlers.ts:66-71 (handler)The handler function that executes the add_labels tool logic.
wrapTool('add_labels', async (args: z.infer<typeof modifyLabelsSchema>) => { await client.tags.addToArticles(args.articleIds, args.labels); return textResult( `Added labels [${args.labels.join(', ')}] to ${args.articleIds.length.toString()} article(s).` ); }) - src/handlers/tag-handlers.ts:60-72 (registration)Registration of the add_labels tool.
server.registerTool( 'add_labels', { description: 'Add labels to articles', inputSchema: modifyLabelsSchema, }, wrapTool('add_labels', async (args: z.infer<typeof modifyLabelsSchema>) => { await client.tags.addToArticles(args.articleIds, args.labels); return textResult( `Added labels [${args.labels.join(', ')}] to ${args.articleIds.length.toString()} article(s).` ); }) ); - src/tools/tag-tools.ts:6-11 (schema)The input schema definition for adding or removing labels.
export const modifyLabelsSchema = z .object({ articleIds: z.array(z.string()).min(1).describe('Article IDs to modify'), labels: z.array(z.string()).min(1).describe('Label names to add/remove'), }) .strict();