Skip to main content
Glama

mergeTags

Combine multiple tags into a single destination tag within the Raindrop.io bookmark manager for streamlined organization and better management of tagged resources.

Instructions

Merge multiple tags into one destination tag

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdNoCollection ID (optional)
destinationTagYesDestination tag name
sourceTagsYesList of source tags to merge

Implementation Reference

  • MCP handler function for the 'tag_manage' tool, which implements the 'merge' operation by calling raindropService.mergeTags
    async function handleTagManage(args: z.infer<typeof TagInputSchema>, { raindropService }: ToolHandlerContext) {
        switch (args.operation) {
            case 'rename':
                if (!args.tagNames || !args.newName) throw new Error('tagNames and newName required for rename');
                const [primaryTag] = args.tagNames;
                if (!primaryTag) throw new Error('tagNames must include at least one value');
                return await raindropService.renameTag(args.collectionId, primaryTag, args.newName!);
            case 'merge':
                if (!args.tagNames || !args.newName) throw new Error('tagNames and newName required for merge');
                return await raindropService.mergeTags(args.collectionId, args.tagNames, args.newName!);
            case 'delete':
                if (!args.tagNames) throw new Error('tagNames required for delete');
                return await raindropService.deleteTags(args.collectionId, args.tagNames);
            default:
                throw new Error(`Unsupported operation: ${String(args.operation)}`);
        }
    }
  • Input schema for tag management operations, including 'merge' for merging tags
    export const TagInputSchema = z.object({
        collectionId: z.number().optional(),
        tagNames: z.array(z.string()),
        newName: z.string().optional(),
        operation: z.enum(["rename", "merge", "delete"]),
    });
  • Tool configuration and registration definition for 'tag_manage', which supports mergeTags functionality
    const tagManageTool = defineTool({
        name: 'tag_manage',
        description: 'Renames, merges, or deletes tags. Use the operation parameter to specify the action.',
        inputSchema: TagInputSchema,
        outputSchema: TagOutputSchema,
        handler: handleTagManage,
    });
  • Core helper function implementing mergeTags by calling Raindrop.io API PUT /tags/{collectionId} with tags to merge into newName
    async mergeTags(collectionId: number | undefined, tags: string[], newName: string): Promise<boolean> {
      const endpoint = collectionId ? '/tags/{collectionId}' : '/tags/0';
      const options = {
        ...(collectionId && { params: { path: { id: collectionId } } }),
        body: { tags, to: newName }
      };
      const { data } = await (this.client as any).PUT(endpoint, options);
      return !!data?.result;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like what happens to source tags after merging (are they deleted?), whether this requires specific permissions, or any side effects. 'Merge' implies mutation but lacks details on consequences.

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 zero waste. It's front-loaded with the core action and resources, making it immediately clear without unnecessary elaboration.

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 incomplete. It doesn't explain what the tool returns, what happens to source tags, or potential errors. Given the complexity of merging operations, more context is needed for an agent to use this effectively.

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?

Schema description coverage is 100%, so the schema already documents all parameters well. The description adds no additional meaning beyond what the schema provides about parameters, but doesn't contradict it either. Baseline 3 is appropriate when schema does the heavy lifting.

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 ('merge') and resources ('multiple tags into one destination tag'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'renameTag' or 'deleteTag' which also operate on tags, missing explicit distinction.

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 'renameTag' or 'deleteTag', nor does it mention prerequisites or context for merging tags. There's no explicit when/when-not usage information.

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