mark-thread-as-unresolved
Mark a Liveblocks thread as unresolved to indicate it requires further attention. Provide roomId, threadId, and user data to update the thread status.
Instructions
Mark a Liveblocks thread as unresolved
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| roomId | Yes | ||
| threadId | Yes |
Implementation Reference
- src/server.ts:358-376 (registration)Full registration of the MCP tool 'mark-thread-as-unresolved', including input schema (roomId, threadId, data.userId) and inline handler function that delegates to Liveblocks SDK's markThreadAsUnresolved method via callLiveblocksApi utility.server.tool( "mark-thread-as-unresolved", "Mark a Liveblocks thread as unresolved", { roomId: z.string(), threadId: z.string(), data: z.object({ userId: z.string(), }), }, async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().markThreadAsUnresolved( { roomId, threadId, data }, { signal: extra.signal } ) ); } );
- src/server.ts:368-375 (handler)The handler function for the tool, which calls the Liveblocks client to mark the thread as unresolved and formats the response using callLiveblocksApi.async ({ roomId, threadId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().markThreadAsUnresolved( { roomId, threadId, data }, { signal: extra.signal } ) ); }
- src/server.ts:361-367 (schema)Input schema for the tool using Zod validation for roomId, threadId, and data containing userId.{ roomId: z.string(), threadId: z.string(), data: z.object({ userId: z.string(), }), },
- src/utils.ts:3-37 (helper)Utility helper function used by all tools, including this one, to call Liveblocks API promises and format responses as MCP CallToolResult with JSON output or error handling.export async function callLiveblocksApi( liveblocksPromise: Promise<any> ): Promise<CallToolResult> { try { const data = await liveblocksPromise; if (!data) { return { content: [{ type: "text", text: "Success. No data returned." }], }; } return { content: [ { type: "text", text: "Here is the data. If the user has no specific questions, return it in a JSON code block", }, { type: "text", text: JSON.stringify(data, null, 2), }, ], }; } catch (err) { return { content: [ { type: "text", text: "" + err, }, ], }; } }