Skip to main content
Glama
liveblocks
by liveblocks

edit-thread-metadata

Modify or remove metadata for specified threads in Liveblocks rooms. Update thread details with user IDs and timestamps for organized collaboration.

Instructions

Edit a Liveblocks thread's metadata. null can be used to remove a key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
roomIdYes
threadIdYes

Implementation Reference

  • The handler function that executes the tool logic by calling the Liveblocks editThreadMetadata API.
    async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().editThreadMetadata( { roomId, threadId, data }, { signal: extra.signal } ) ); }
  • Input schema using Zod for validating parameters: roomId, threadId, and data object containing metadata, userId, and optional updatedAt.
    { roomId: z.string(), threadId: z.string(), data: z.object({ metadata: z.record( z.string(), z.union([z.string(), z.boolean(), z.number(), z.null()]) ), userId: z.string(), updatedAt: z.date().optional(), }), },
  • src/server.ts:313-336 (registration)
    Registration of the 'edit-thread-metadata' tool with McpServer, specifying name, description, input schema, and handler function.
    server.tool( "edit-thread-metadata", `Edit a Liveblocks thread's metadata. \`null\` can be used to remove a key.`, { roomId: z.string(), threadId: z.string(), data: z.object({ metadata: z.record( z.string(), z.union([z.string(), z.boolean(), z.number(), z.null()]) ), userId: z.string(), updatedAt: z.date().optional(), }), }, async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().editThreadMetadata( { roomId, threadId, data }, { signal: extra.signal } ) ); } );

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/liveblocks/liveblocks-mcp-server'

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