Skip to main content
Glama

readwise_get_book_highlights

Retrieve all highlights from a specific book in your Readwise library by providing the book ID, enabling quick access to key passages and insights.

Instructions

Get all highlights from a specific book

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bookIdYesThe ID of the book to get highlights from

Implementation Reference

  • The core handler function for the readwise_get_book_highlights tool. It initializes the Readwise client, fetches all highlights for the given bookId using the SDK client, strips the response to essential fields (id, text, note), and returns the data as a JSON-formatted text content block for MCP response.
    export async function handleGetBookHighlights(args: any) {
      const client = await initializeClient();
      
      const response = await client.getBookHighlights(args.bookId);
      
      // Strip to essentials
      const minimal = response.data.map(h => ({
        id: h.id,
        text: h.text,
        note: h.note || undefined
      }));
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(minimal, null, 2),
          },
        ],
      };
    }
  • The tool definition including input schema for readwise_get_book_highlights, requiring a numeric bookId parameter.
    {
      name: 'readwise_get_book_highlights',
      description: 'Get all highlights from a specific book',
      inputSchema: {
        type: 'object',
        properties: {
          bookId: {
            type: 'number',
            description: 'The ID of the book to get highlights from',
          },
        },
        required: ['bookId'],
        additionalProperties: false,
      },
    },
  • Import statement registering the handleGetBookHighlights handler function from highlights-handlers.ts into the main tool dispatcher.
    import {
      handleListHighlights,
      handleCreateHighlight,
      handleExportHighlights,
      handleGetDailyReview,
      handleListBooks,
      handleGetBookHighlights,
      handleSearchHighlights,
    } from './highlights-handlers.js';
  • Switch case in the main handleToolCall function that registers and dispatches 'readwise_get_book_highlights' tool calls to the handler.
    case 'readwise_get_book_highlights':
      return handleGetBookHighlights(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Get all highlights' implies a read operation, it doesn't specify whether this returns paginated results, what format the highlights come in, whether it requires authentication, or any rate limits. The description is minimal and lacks important operational context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core functionality without any wasted words. It's appropriately sized for a simple retrieval tool and gets straight to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-parameter retrieval tool with no output schema, the description provides the basic purpose but lacks important context about return format, pagination, or how it differs from sibling tools. It's minimally adequate but leaves significant gaps in understanding the tool's full behavior and appropriate usage scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, with the single parameter 'bookId' clearly documented in the schema. The description adds no additional parameter information beyond what's already in the structured schema, so it meets the baseline expectation without adding extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get all highlights') and target resource ('from a specific book'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'readwise_list_highlights' or 'readwise_search_highlights', which likely have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'readwise_list_highlights' and 'readwise_search_highlights' available, there's no indication of when this specific book-focused retrieval is preferred over more general highlight listing or searching tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/arnaldo-delisio/readwise-mcp-enhanced'

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