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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"index": "<index>"
},
"name": "summarize_post"
}
}Input 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)