get_article
Retrieve full article content including body text from Tiny Tiny RSS feeds using article IDs. Supports fetching multiple articles with comma-separated IDs.
Instructions
获取一篇或多篇文章的完整内容 (含正文)。支持逗号分隔的多个 ID。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| article_id | Yes | 文章 ID,支持逗号分隔的多个 ID (如 '123,456') |
Implementation Reference
- src/tools/articles.ts:68-91 (handler)Handler implementation for the 'get_article' tool, which takes an 'article_id' and returns article details.
async ({ article_id }) => { try { const articles = await client.getArticle(article_id); const simplified = articles.map((a) => ({ id: a.id, title: a.title, link: a.link, author: a.author, updated: new Date(a.updated * 1000).toISOString(), content: a.content, feed_title: a.feed_title, feed_id: a.feed_id, unread: a.unread, marked: a.marked, published: a.published, labels: a.labels, note: a.note, attachments: a.attachments, })); return ok(JSON.stringify(simplified, null, 2)); } catch (e: unknown) { return fail(`获取文章内容失败: ${(e as Error).message}`); } }, - src/tools/articles.ts:62-67 (registration)Registration of the 'get_article' tool with its schema definition.
server.tool( "get_article", "获取一篇或多篇文章的完整内容 (含正文)。支持逗号分隔的多个 ID。", { article_id: z.string().describe("文章 ID,支持逗号分隔的多个 ID (如 '123,456')"), },