Skip to main content
Glama

search-bookmarks

Search and filter your Raindrop.io bookmarks by query, tags, or collection. Sort results and paginate for efficient access to saved content.

Instructions

Search through your Raindrop.io bookmarks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionNoCollection ID to search in (optional, 0 for all collections)
pageNoPage number (0-based, optional)
perpageNoItems per page (1-50, optional)
queryYesSearch query
sortNoSort order (optional). Prefix with - for descending order.
tagsNoFilter by tags (optional)
wordNoWhether to match exact words only (optional)

Implementation Reference

  • Executes the 'search-bookmarks' tool: validates input, constructs search parameters, calls Raindrop API, formats and returns results.
    if (name === "search-bookmarks") { const { query, tags, page, perpage, sort, collection, word } = SearchBookmarksSchema.parse(args); const searchParams = new URLSearchParams({ search: query, ...(tags && { tags: tags.join(",") }), ...(page !== undefined && { page: page.toString() }), ...(perpage !== undefined && { perpage: perpage.toString() }), ...(sort && { sort }), ...(word !== undefined && { word: word.toString() }), }); const collectionId = collection ?? 0; const results = await api.searchBookmarks(collectionId, searchParams); const formattedResults = results.items .map( (item) => ` Title: ${item.title} URL: ${item.link} Tags: ${item.tags?.length ? item.tags.join(", ") : "No tags"} Created: ${new Date(item.created).toLocaleString()} Last Updated: ${new Date(item.lastUpdate).toLocaleString()} ---`, ) .join("\n"); return { content: [ { type: "text", text: results.items.length > 0 ? `Found ${results.count} total bookmarks (showing ${ results.items.length } on page ${page ?? 0 + 1}):\n${formattedResults}` : "No bookmarks found matching your search.", }, ], }; }
  • MCP tool definition for 'search-bookmarks' including input schema for validation.
    { name: "search-bookmarks", description: "Search through your Raindrop.io bookmarks", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query", }, tags: { type: "array", items: { type: "string" }, description: "Filter by tags (optional)", }, page: { type: "number", description: "Page number (0-based, optional)", }, perpage: { type: "number", description: "Items per page (1-50, optional)", }, sort: { type: "string", enum: [ "-created", "created", "-last_update", "last_update", "-title", "title", "-domain", "domain", ], description: "Sort order (optional). Prefix with - for descending order.", }, collection: { type: "number", description: "Collection ID to search in (optional, 0 for all collections)", }, word: { type: "boolean", description: "Whether to match exact words only (optional)", }, }, required: ["query"], }, },
  • src/index.ts:29-31 (registration)
    Registers the list of available tools, including 'search-bookmarks', via ListToolsRequest handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • Helper method in RaindropAPI that performs the API search request to Raindrop.io.
    async searchBookmarks( collectionId: number, searchParams: URLSearchParams, ): Promise<SearchResponse> { return this.makeRequest<SearchResponse>( `/raindrops/${collectionId}?${searchParams.toString()}`, ); } async listCollections(): Promise<CollectionsResponse> { return this.makeRequest<CollectionsResponse>("/collections"); } }
  • Zod schema for validating 'search-bookmarks' tool arguments.
    export const SearchBookmarksSchema = z.object({ query: z.string(), tags: z.array(z.string()).optional(), page: z.number().min(0).optional(), perpage: z.number().min(1).max(50).optional(), sort: z .enum([ "-created", "created", "-last_update", "last_update", "-title", "title", "-domain", "domain", ]) .optional(), collection: z.number().optional(), word: z.boolean().optional(), });

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/hiromitsusasaki/raindrop-io-mcp-server'

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