Skip to main content
Glama

readwise_delete_document

Remove unwanted documents from Readwise Reader by providing the document ID. This tool ensures efficient document management within the Readwise MCP Enhanced server.

Instructions

Delete a document from Readwise Reader

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesDocument ID to delete

Implementation Reference

  • The core handler function that implements the readwise_delete_document tool. It destructures the document ID from input args, initializes the Readwise client, calls deleteDocument on the client, formats a success response with any messages, and returns it in the expected MCP content format.
    export async function handleDeleteDocument(args: any) { const client = initializeClient(); const { id } = args as { id: string }; const response = await client.deleteDocument(id); let responseText = `Document ${id} deleted successfully!`; 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 including name, description, and input validation schema requiring a string 'id'.
    { name: 'readwise_delete_document', description: 'Delete a document from Readwise Reader', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Document ID to delete', }, }, required: ['id'], additionalProperties: false, }, },
  • The dispatch registration in the main handler switch statement that routes calls to the specific handleDeleteDocument function.
    case 'readwise_delete_document': return handleDeleteDocument(args);

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