getCollection
Retrieve a specific collection by its unique ID from Raindrop.io's bookmark manager. Use this tool to efficiently access and manage saved bookmarks within defined collections.
Instructions
Get a specific collection by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Collection ID |
Implementation Reference
- src/services/raindrop.service.ts:58-64 (handler)Core handler function that implements fetching a single Raindrop collection by ID using the API client. This is the exact implementation logic for 'getCollection'.async getCollection(id: number): Promise<Collection> { const { data } = await this.client.GET('/collection/{id}', { params: { path: { id } } }); if (!data?.item) throw new Error('Collection not found'); return data.item; }
- Usage of getCollection in the MCP resource reader for handling mcp://collection/{id} URIs dynamically.} const collection = await this.raindropService.getCollection(collectionId); return { contents: [{ uri, text: JSON.stringify({ collection }, null, 2) }] };
- src/services/raindrop.service.ts:49-52 (handler)Related getCollections method for listing all collections, often used alongside getCollection.async getCollections(): Promise<Collection[]> { const { data } = await this.client.GET('/collections'); return [...(data?.items || [])]; }