updateBookmark
Modify existing bookmarks in Raindrop.io by updating titles, descriptions, tags, importance, or moving them to new collections for organized access.
Instructions
Update an existing bookmark
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collectionId | No | Collection ID to move the bookmark to | |
| excerpt | No | Short excerpt or description | |
| id | Yes | Bookmark ID | |
| important | No | Mark as important | |
| tags | No | List of tags | |
| title | No | Title of the bookmark |
Implementation Reference
- Core implementation of updateBookmark: performs the HTTP PUT request to the Raindrop.io API to update a specific bookmark by ID.async updateBookmark(id: number, updates: Partial<Bookmark>): Promise<Bookmark> { const { data } = await this.client.PUT('/raindrop/{id}', { params: { path: { id } }, body: updates }); if (!data?.item) throw new Error('Failed to update bookmark'); return data.item; }
- Part of bookmark_manage MCP tool handler that handles the 'update' operation by preparing payload and calling the updateBookmark service method.case 'update': if (!args.id) throw new Error('id is required for update'); const updatePayload: Record<string, unknown> = { link: args.url, title: args.title, }; setIfDefined(updatePayload, 'excerpt', args.description); setIfDefined(updatePayload, 'tags', args.tags); setIfDefined(updatePayload, 'important', args.important); return await raindropService.updateBookmark(args.id, updatePayload as any); case 'delete': if (!args.id) throw new Error('id is required for delete'); await raindropService.deleteBookmark(args.id); return { deleted: true }; default: throw new Error(`Unsupported operation: ${String(args.operation)}`); } }
- Full code block including JSDoc for the updateBookmark helper function used by MCP tools./** * Update a bookmark * Raindrop.io API: PUT /raindrop/{id} */ async updateBookmark(id: number, updates: Partial<Bookmark>): Promise<Bookmark> { const { data } = await this.client.PUT('/raindrop/{id}', { params: { path: { id } }, body: updates }); if (!data?.item) throw new Error('Failed to update bookmark'); return data.item; }