Skip to main content
Glama

createHighlight

Create a new highlight for a bookmark in Raindrop.io by specifying the text and bookmark ID. Add optional color and notes to organize and customize your highlights.

Instructions

Create a new highlight for a bookmark

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNoColor for the highlight (e.g., "yellow", "#FFFF00")
noteNoAdditional note for the highlight
raindropIdYesBookmark ID
textYesHighlighted text

Implementation Reference

  • Core helper function implementing the Raindrop.io API call to create a highlight (POST /highlights). This is the exact API integration logic for creating highlights.
    async createHighlight(bookmarkId: number, highlight: {
      text: string;
      note?: string;
      color?: string;
    }): Promise<Highlight> {
      const { data } = await this.client.POST('/highlights', {
        body: {
          ...highlight,
          raindrop: { $id: bookmarkId },
          color: (highlight.color as any) || 'yellow'
        }
      });
      if (!data?.item) throw new Error('Failed to create highlight');
      return data.item;
    }
  • MCP handler function for the 'highlight_manage' tool. The 'create' operation invokes the createHighlight helper with prepared payload from tool arguments.
    async function handleHighlightManage(args: z.infer<typeof HighlightManageInputSchema>, { raindropService }: ToolHandlerContext) {
        switch (args.operation) {
            case 'create':
                if (!args.bookmarkId || !args.text) throw new Error('bookmarkId and text required for create');
                const createPayload: Record<string, unknown> = { text: args.text };
                setIfDefined(createPayload, 'note', args.note);
                setIfDefined(createPayload, 'color', args.color);
                return await raindropService.createHighlight(args.bookmarkId, createPayload as any);
            case 'update':
                if (!args.id) throw new Error('id required for update');
                const updatePayload: Record<string, unknown> = {};
                setIfDefined(updatePayload, 'text', args.text);
                setIfDefined(updatePayload, 'note', args.note);
                setIfDefined(updatePayload, 'color', args.color);
                return await raindropService.updateHighlight(args.id, updatePayload as any);
            case 'delete':
                if (!args.id) throw new Error('id required for delete');
                await raindropService.deleteHighlight(args.id);
                return { deleted: true };
            default:
                throw new Error(`Unsupported operation: ${String(args.operation)}`);
        }
    }
  • Input schema validation for highlight management tool, extending base HighlightInputSchema with operation type and optional ID.
    const HighlightManageInputSchema = HighlightInputSchema.extend({
        operation: z.enum(['create', 'update', 'delete']),
        id: z.number().optional(),
    });
  • Tool configuration and registration definition for 'highlight_manage', which handles create/update/delete including createHighlight logic.
    const highlightManageTool = defineTool({
        name: 'highlight_manage',
        description: 'Creates, updates, or deletes highlights. Use the operation parameter to specify the action.',
        inputSchema: HighlightManageInputSchema,
        outputSchema: HighlightOutputSchema,
        handler: handleHighlightManage,
    });
  • Base Zod schema for highlight input parameters (bookmarkId, text, note, color), used by HighlightManageInputSchema.
    export const HighlightInputSchema = z.object({
        bookmarkId: z.number(),
        text: z.string(),
        note: z.string().optional(),
        color: z.string().optional(),
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Create' implies a write operation, the description doesn't specify whether this requires authentication, what happens on success/failure, if there are rate limits, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward creation tool and is front-loaded with the essential information. Every word earns its place in this concise formulation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what happens after creation, what the return value might be, or any error conditions. While the schema covers parameters well, the overall context for using this tool remains incomplete, especially given its write nature and lack of structured behavioral hints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds no parameter information beyond what's already in the schema, which has 100% coverage with clear descriptions for all four parameters. The baseline score of 3 reflects that the schema adequately documents parameters, so the description doesn't need to compensate, but also doesn't add any additional semantic context about how parameters interact or their practical usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Create') and target resource ('a new highlight for a bookmark'), making the purpose immediately understandable. It distinguishes from sibling tools like 'updateHighlight' and 'deleteHighlight' by specifying creation rather than modification or deletion. However, it doesn't explicitly differentiate from 'getAllHighlights' or 'getHighlights' which are read operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'updateHighlight' or 'deleteHighlight'. It doesn't mention prerequisites (e.g., needing an existing bookmark), nor does it specify scenarios where this tool is appropriate versus when other highlight-related tools should be used instead.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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/adeze/raindrop-mcp'

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