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
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| roomId | Yes | ||
| threadId | Yes |
Implementation Reference
- src/server.ts:328-335 (handler)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 } ) ); }
- src/server.ts:316-327 (schema)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 } ) ); } );