Skip to main content
Glama

readwise_list_highlights

Retrieve and filter your saved highlights from Readwise by book, date, or other criteria to organize and review important content.

Instructions

List highlights from Readwise with optional filtering by book, date, or other criteria

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_sizeNoNumber of results per page (default: 100, max: 1000)
pageNoPage number for pagination
book_idNoFilter highlights by specific book ID
updated__ltNoFilter highlights updated before this date (ISO 8601)
updated__gtNoFilter highlights updated after this date (ISO 8601)
highlighted_at__ltNoFilter highlights made before this date (ISO 8601)
highlighted_at__gtNoFilter highlights made after this date (ISO 8601)

Implementation Reference

  • The handler function that implements the core logic for the 'readwise_list_highlights' tool. It initializes the Readwise client, constructs query parameters from the input arguments, fetches highlights using client.listHighlights, strips the response to essential fields (id, text, note, book_id), and returns the result as formatted JSON text content.
    export async function handleListHighlights(args: any) {
      const client = await initializeClient();
      
      const params = {
        page_size: args.page_size,
        page: args.page,
        book_id: args.book_id,
        updated__lt: args.updated__lt,
        updated__gt: args.updated__gt,
        highlighted_at__lt: args.highlighted_at__lt,
        highlighted_at__gt: args.highlighted_at__gt,
      };
      
      const response = await client.listHighlights(params);
      
      // Strip to essentials
      const minimal = {
        count: response.data.count,
        results: response.data.results.map(h => ({
          id: h.id,
          text: h.text,
          note: h.note || undefined,
          book_id: h.book_id
        }))
      };
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(minimal, null, 2),
          },
        ],
      };
    }
  • The tool definition including name, description, and input schema specifying optional parameters for pagination, book filtering, and date ranges.
      name: 'readwise_list_highlights',
      description: 'List highlights from Readwise with optional filtering by book, date, or other criteria',
      inputSchema: {
        type: 'object',
        properties: {
          page_size: {
            type: 'number',
            description: 'Number of results per page (default: 100, max: 1000)',
          },
          page: {
            type: 'number',
            description: 'Page number for pagination',
          },
          book_id: {
            type: 'number',
            description: 'Filter highlights by specific book ID',
          },
          updated__lt: {
            type: 'string',
            description: 'Filter highlights updated before this date (ISO 8601)',
          },
          updated__gt: {
            type: 'string',
            description: 'Filter highlights updated after this date (ISO 8601)',
          },
          highlighted_at__lt: {
            type: 'string',
            description: 'Filter highlights made before this date (ISO 8601)',
          },
          highlighted_at__gt: {
            type: 'string',
            description: 'Filter highlights made after this date (ISO 8601)',
          },
        },
        additionalProperties: false,
      },
    },
  • The switch case in the main tool dispatcher that routes 'readwise_list_highlights' calls to the handleListHighlights function.
    case 'readwise_list_highlights':
      return handleListHighlights(args);
  • Import statement that brings in the handleListHighlights function from highlights-handlers.js for use in the tool dispatcher.
      handleListHighlights,
      handleCreateHighlight,
      handleExportHighlights,
      handleGetDailyReview,
      handleListBooks,
      handleGetBookHighlights,
      handleSearchHighlights,
    } from './highlights-handlers.js';
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool lists highlights with filtering but doesn't disclose behavioral traits such as pagination behavior (implied by parameters but not explained), rate limits, authentication needs, or what the return format looks like (no output schema). This is a significant gap for a tool with multiple parameters and no structured safety hints.

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 front-loads the core action ('List highlights') and adds necessary context ('with optional filtering'). There's no wasted verbiage, making it highly concise and well-structured.

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?

Given the complexity (7 parameters, no annotations, no output schema), the description is incomplete. It covers the basic purpose but lacks details on usage guidelines, behavioral transparency, and output expectations. However, the schema provides full parameter documentation, preventing a lower score.

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?

Schema description coverage is 100%, so the schema fully documents all 7 parameters. The description adds minimal value by mentioning filtering by book, date, or other criteria, but doesn't provide additional semantics beyond what's in the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

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 verb ('List') and resource ('highlights from Readwise'), making the purpose evident. However, it doesn't explicitly differentiate from siblings like 'readwise_get_book_highlights' or 'readwise_search_highlights', which might have overlapping functionality, so it's not a perfect 5.

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 mentions optional filtering but provides no guidance on when to use this tool versus alternatives like 'readwise_get_book_highlights' or 'readwise_search_highlights'. There's no context on use cases, exclusions, or prerequisites, leaving the agent to guess based on tool names alone.

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