Skip to main content
Glama

readwise_list_books

Retrieve books with highlights from Readwise, filter by category, source, or date to organize your reading materials.

Instructions

List books that have highlights in Readwise with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_sizeNoNumber of results per page (default: 100, max: 1000)
pageNoPage number for pagination
categoryNoFilter books by category
sourceNoFilter books by source
updated__ltNoFilter books updated before this date (ISO 8601)
updated__gtNoFilter books updated after this date (ISO 8601)
last_highlight_at__ltNoFilter books with last highlight before this date (ISO 8601)
last_highlight_at__gtNoFilter books with last highlight after this date (ISO 8601)

Implementation Reference

  • The handleListBooks function implements the core logic for the readwise_list_books tool. It initializes the Readwise client, maps input arguments to API parameters, calls the Readwise API's listBooks method, processes the response to include essential fields only, and returns the result as MCP-formatted content.
    export async function handleListBooks(args: any) {
      const client = await initializeClient();
      
      const params = {
        page_size: args.page_size,
        page: args.page,
        category: args.category,
        source: args.source,
        updated__lt: args.updated__lt,
        updated__gt: args.updated__gt,
        last_highlight_at__lt: args.last_highlight_at__lt,
        last_highlight_at__gt: args.last_highlight_at__gt,
      };
      
      const response = await client.listBooks(params);
      
      // Strip to essentials
      const minimal = {
        count: response.data.count,
        results: response.data.results.map(b => ({
          id: b.id,
          title: b.title,
          author: b.author,
          category: b.category,
          num_highlights: b.num_highlights
        }))
      };
      
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(minimal, null, 2),
          },
        ],
      };
    }
  • Defines the tool schema including name, description, and detailed inputSchema with properties for pagination, filtering by category/source/date, matching the handler parameters.
    {
      name: 'readwise_list_books',
      description: 'List books that have highlights in Readwise with optional filtering',
      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',
          },
          category: {
            type: 'string',
            enum: ['books', 'articles', 'tweets', 'supplementals', 'podcasts'],
            description: 'Filter books by category',
          },
          source: {
            type: 'string',
            description: 'Filter books by source',
          },
          updated__lt: {
            type: 'string',
            description: 'Filter books updated before this date (ISO 8601)',
          },
          updated__gt: {
            type: 'string',
            description: 'Filter books updated after this date (ISO 8601)',
          },
          last_highlight_at__lt: {
            type: 'string',
            description: 'Filter books with last highlight before this date (ISO 8601)',
          },
          last_highlight_at__gt: {
            type: 'string',
            description: 'Filter books with last highlight after this date (ISO 8601)',
          },
        },
        additionalProperties: false,
      },
    },
  • In the main handleToolCall dispatcher, the 'readwise_list_books' case routes tool calls to the handleListBooks handler function.
    case 'readwise_list_books':
      return handleListBooks(args);
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 this is a list operation, implying read-only behavior, but doesn't disclose pagination details (e.g., default page size, max limits), rate limits, authentication needs, or what happens with no results. The mention of 'optional filtering' hints at query capabilities but lacks specifics.

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 purpose ('List books that have highlights in Readwise') and adds a useful qualifier ('with optional filtering'). There's no wasted text, 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 no annotations, no output schema, and 8 parameters with full schema coverage, the description is adequate but has gaps. It covers the basic purpose but lacks behavioral details (e.g., pagination behavior, error cases) and usage guidelines. For a list tool with many filtering options, more context would be beneficial.

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 8 parameters. The description adds minimal value by mentioning 'optional filtering', which aligns with parameters like 'category' and 'source', but doesn't provide additional semantics beyond what's in the schema. Baseline 3 is appropriate given high schema coverage.

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 'books that have highlights in Readwise', making the purpose evident. It distinguishes from siblings like 'list_documents' by specifying books with highlights, though it doesn't explicitly contrast with 'list_highlights' or 'get_book_highlights'.

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 'list_documents' or 'get_book_highlights'. There's no context on prerequisites, such as requiring existing books with highlights, or exclusions.

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