Skip to main content
Glama
edricgsh

Readwise Reader MCP Server

by edricgsh

readwise_update_document

Modify document metadata in Readwise Reader by updating title, author, summary, category, location, image URL, or published date using the document ID.

Instructions

Update a document in Readwise Reader

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authorNoNew author for the document
categoryNoNew category for the document
idYesDocument ID to update
image_urlNoNew image URL for the document
locationNoNew location for the document
published_dateNoNew published date (ISO 8601)
summaryNoNew summary for the document
titleNoNew title for the document

Implementation Reference

  • The primary handler function that executes the readwise_update_document tool. It destructures the document ID and update parameters from the input args, initializes the Readwise client, invokes the client's updateDocument method, and returns a formatted text response including success details and any API messages.
    export async function handleUpdateDocument(args: any) { const client = initializeClient(); const { id, ...updateData } = args as unknown as { id: string } & UpdateDocumentRequest; const response = await client.updateDocument(id, updateData); let responseText = `Document updated successfully!\nID: ${response.data.id}\nReader URL: ${response.data.url}`; if (response.messages && response.messages.length > 0) { responseText += '\n\nMessages:\n' + response.messages.map(msg => `${msg.type.toUpperCase()}: ${msg.content}`).join('\n'); } return { content: [ { type: 'text', text: responseText, }, ], }; }
  • The tool schema definition specifying the name, description, and input validation schema (JSON Schema) for the readwise_update_document tool.
    { name: 'readwise_update_document', description: 'Update a document in Readwise Reader', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Document ID to update', }, title: { type: 'string', description: 'New title for the document', }, author: { type: 'string', description: 'New author for the document', }, summary: { type: 'string', description: 'New summary for the document', }, published_date: { type: 'string', description: 'New published date (ISO 8601)', }, image_url: { type: 'string', description: 'New image URL for the document', }, location: { type: 'string', enum: ['new', 'later', 'shortlist', 'archive', 'feed'], description: 'New location for the document', }, category: { type: 'string', enum: ['article', 'book', 'tweet', 'pdf', 'email', 'youtube', 'podcast'], description: 'New category for the document', }, }, required: ['id'], additionalProperties: false, }, },
  • The switch case in the main tool dispatcher (handleToolCall) that registers and routes calls to 'readwise_update_document' to the specific handler function.
    case 'readwise_update_document': return handleUpdateDocument(args);
  • Import statement registering the handleUpdateDocument handler function from document-handlers.ts for use in the tool dispatcher.
    handleUpdateDocument,

Other Tools

Related 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/edricgsh/Readwise-Reader-MCP'

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