readwise_create_highlight
Manually create and save highlights in Readwise for books, articles, tweets, and podcasts. Add text, notes, source details, and locations to organize and reference key insights effectively.
Instructions
Create new highlights manually in Readwise
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| highlights | Yes | Array of highlights to create |
Implementation Reference
- The main handler function that executes the readwise_create_highlight tool logic. It initializes the Readwise client, calls client.createHighlight with the provided arguments, and returns the response as JSON text content.export async function handleCreateHighlight(args: any) { const client = await initializeClient(); const response = await client.createHighlight(args); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; }
- The input schema and metadata definition for the readwise_create_highlight tool in the tools array.{ name: 'readwise_create_highlight', description: 'Create new highlights manually in Readwise', inputSchema: { type: 'object', properties: { highlights: { type: 'array', items: { type: 'object', properties: { text: { type: 'string', description: 'The highlight text (required)', }, title: { type: 'string', description: 'Title of the source book/article', }, author: { type: 'string', description: 'Author of the source', }, source_url: { type: 'string', description: 'URL of the original source', }, source_type: { type: 'string', description: 'Unique identifier for your app/source', }, category: { type: 'string', enum: ['books', 'articles', 'tweets', 'podcasts'], description: 'Category of the source', }, note: { type: 'string', description: 'Personal note or annotation for the highlight', }, location: { type: 'number', description: 'Location in the source (page number, position, etc.)', }, location_type: { type: 'string', enum: ['page', 'order', 'time_offset'], description: 'Type of location reference', }, highlighted_at: { type: 'string', description: 'When the highlight was made (ISO 8601)', }, }, required: ['text'], }, description: 'Array of highlights to create', minItems: 1, }, }, required: ['highlights'], additionalProperties: false, }, },
- src/handlers/index.ts:42-43 (registration)Registration/dispatch in the central handleToolCall switch statement that routes calls to the specific handler.case 'readwise_create_highlight': return handleCreateHighlight(args);
- src/index.ts:24-26 (registration)MCP server registration of the ListTools handler, which returns the tools array containing readwise_create_highlight.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });