Skip to main content
Glama

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
NameRequiredDescriptionDefault
book_idYes
chapter_numberYes

Implementation Reference

  • 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)}" )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/libralm-ai/libralm_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server