get-threads
Retrieve recent threads from a Liveblocks room by specifying room ID and optional query filters such as resolved status or metadata.
Instructions
Get recent Liveblocks threads
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| roomId | Yes |
Implementation Reference
- src/server.ts:252-256 (handler)The handler function that executes the 'get-threads' tool by calling the Liveblocks getThreads API.async ({ roomId, query }, extra) => { return await callLiveblocksApi( getLiveblocks().getThreads({ roomId, query }, { signal: extra.signal }) ); }
- src/server.ts:233-251 (schema)Input schema for the 'get-threads' tool defining parameters roomId and optional query with resolved and metadata filters.{ roomId: z.string(), query: z .object({ resolved: z.boolean().optional(), metadata: z .record( z.string(), z.union([ z.string(), z.object({ startsWith: z.string(), }), ]) ) .optional(), }) .optional(), },
- src/server.ts:230-257 (registration)Registration of the 'get-threads' tool on the MCP server using server.tool() including description, input schema, and handler.server.tool( "get-threads", `Get recent Liveblocks threads`, { roomId: z.string(), query: z .object({ resolved: z.boolean().optional(), metadata: z .record( z.string(), z.union([ z.string(), z.object({ startsWith: z.string(), }), ]) ) .optional(), }) .optional(), }, async ({ roomId, query }, extra) => { return await callLiveblocksApi( getLiveblocks().getThreads({ roomId, query }, { signal: extra.signal }) ); } );