Skip to main content
Glama

updateHighlight

Modify existing highlights in Raindrop.io by updating text, color, or notes for better organization and clarity of saved bookmarks.

Instructions

Update an existing highlight

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNoNew color
idYesHighlight ID
noteNoNew note
textNoNew highlighted text

Implementation Reference

  • MCP tool handler for 'highlight_manage' tool. The 'update' operation case constructs the payload and calls the updateHighlight helper on the RaindropService. This is the entry point for updating highlights via the MCP protocol.
    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)}`);
        }
    }
  • Core service method that performs the actual HTTP PUT request to the Raindrop.io API to update a highlight by ID with optional text, note, or color changes.
    async updateHighlight(id: number, updates: {
      text?: string;
      note?: string;
      color?: string;
    }): Promise<Highlight> {
      const { data } = await this.client.PUT('/highlights/{id}', {
        params: { path: { id } },
        body: {
          ...(updates.text && { text: updates.text }),
          ...(updates.note && { note: updates.note }),
          ...(updates.color && { color: updates.color as any })
        }
      });
      if (!data?.item) throw new Error('Failed to update highlight');
      return data.item;
    }
  • Configuration object for the 'highlight_manage' MCP tool, which is later registered in registerDeclarativeTools(). This tool handles updates to highlights using the updateHighlight helper.
    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 defining input parameters for highlight operations (text, note, color), extended by HighlightManageInputSchema for the MCP tool with operation and id fields.
    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?

No annotations are provided, so the description carries the full burden. 'Update an existing highlight' implies a mutation operation, but it doesn't disclose behavioral traits such as required permissions, whether updates are partial or complete, error handling, or side effects. This leaves significant gaps for a tool that modifies data.

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 with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by conveying the essential purpose.

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?

Given the complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects, usage context, and expected outcomes. For a tool that updates data, this minimal description leaves the agent with insufficient guidance.

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 input schema has 100% description coverage, with clear parameter descriptions (e.g., 'New color', 'Highlight ID'). The description adds no meaning beyond this, as it doesn't explain parameter interactions, constraints, or examples. With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose3/5

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

The description 'Update an existing highlight' clearly states the action (update) and resource (highlight), but it's vague about what aspects can be updated. It doesn't distinguish this tool from sibling tools like 'updateBookmark' or 'updateCollection', which follow the same pattern for different resources.

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. It doesn't mention prerequisites (e.g., needing an existing highlight ID), exclusions, or comparisons to similar tools like 'createHighlight' or 'deleteHighlight'. The agent must infer usage from the tool name alone.

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