feat(mcp): add post detail retrieval tool

This commit is contained in:
Tim
2025-10-27 20:19:17 +08:00
parent 26ca9fc916
commit 62edc75735
3 changed files with 89 additions and 1 deletions

View File

@@ -260,3 +260,14 @@ class RecentPostsResponse(BaseModel):
CommentData.model_rebuild()
class PostDetail(PostSummary):
"""Detailed information for a single post, including comments."""
comments: list[CommentData] = Field(
default_factory=list,
description="Comments that belong to the post.",
)
model_config = ConfigDict(populate_by_name=True, extra="allow")