get_chapter_summary
Extract key insights from specific book chapters by providing book ID and chapter number to access AI-generated summaries.
Instructions
Get the summary for a specific chapter of a book
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| book_id | Yes | ||
| chapter_number | Yes |
Implementation Reference
- libralm_mcp_server.py:190-200 (handler)The handler function for the 'get_chapter_summary' tool. It is registered via the @mcp.tool() decorator and implements the logic to fetch a chapter summary from the LibraLM API using the _make_api_request helper.@mcp.tool() def get_chapter_summary(book_id: str, chapter_number: int) -> str: """Get the summary for a specific chapter of a book""" try: data = _make_api_request(f"/books/{book_id}/chapters/{chapter_number}") return data.get("summary", "") except Exception as e: raise ValueError( f"Error getting chapter {chapter_number} summary for book '{book_id}': {str(e)}" )