summarize_post
Generate AI-powered summaries of V2.ai Insights blog posts by specifying the post index to extract key content quickly.
Instructions
Returns a summary of the blog post at the specified index
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes |
Implementation Reference
- src/v2_ai_mcp/main.py:17-32 (handler)The internal logic implementation of `_summarize_post` which performs the actual fetching and summarization of the blog post.
def _summarize_post(index: int): """Returns a summary of the blog post at the specified index""" posts = fetch_blog_posts() if 0 <= index < len(posts): post = posts[index] summary = summarize(post["content"]) return { "title": post["title"], "date": post["date"], "author": post["author"], "url": post["url"], "summary": summary, } else: return {"error": f"Invalid index. Available posts: 0 to {len(posts) - 1}"} - src/v2_ai_mcp/main.py:88-90 (registration)The registration of the `summarize_post` tool using the @mcp.tool decorator.
def summarize_post(index: int): """Returns a summary of the blog post at the specified index""" return _summarize_post(index)