Skip to main content
Glama
liveblocks

Liveblocks

Official
by liveblocks

create-thread

Create collaborative comment threads in real-time rooms for team discussions and feedback.

Instructions

Create a Liveblocks thread. Always ask for a userId.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYes
dataYes

Implementation Reference

  • The handler function that executes the 'create-thread' tool logic by proxying to the Liveblocks createThread API wrapped in callLiveblocksApi.
    async ({ roomId, data }, extra) => {
      return await callLiveblocksApi(
        getLiveblocks().createThread({ roomId, data }, { signal: extra.signal })
      );
    }
  • Input schema for the 'create-thread' tool, defining parameters roomId and data (with comment body, userId, and optional metadata). Uses CommentBody from zod.ts.
    {
      roomId: z.string(),
      data: z.object({
        comment: z.object({
          body: CommentBody,
          userId: z.string(),
          createdAt: z.date().optional(),
        }),
        metadata: z
          .record(z.string(), z.union([z.string(), z.boolean(), z.number()]))
          .optional(),
      }),
    },
  • src/server.ts:259-280 (registration)
    Registration of the 'create-thread' tool on the MCP server, including name, description, input schema, and inline handler function.
    server.tool(
      "create-thread",
      `Create a Liveblocks thread. Always ask for a userId.`,
      {
        roomId: z.string(),
        data: z.object({
          comment: z.object({
            body: CommentBody,
            userId: z.string(),
            createdAt: z.date().optional(),
          }),
          metadata: z
            .record(z.string(), z.union([z.string(), z.boolean(), z.number()]))
            .optional(),
        }),
      },
      async ({ roomId, data }, extra) => {
        return await callLiveblocksApi(
          getLiveblocks().createThread({ roomId, data }, { signal: extra.signal })
        );
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'Always ask for a userId', which hints at authentication or user context needs, but doesn't describe what a thread is, whether creation is idempotent, what happens on success/failure, or any rate limits. For a creation tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and front-loaded with the core action, consisting of two concise sentences. There's no unnecessary verbosity, and each sentence serves a purpose (stating the action and providing a usage tip). However, the second sentence could be integrated more smoothly.

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?

Given the complexity (2 parameters with nested objects, no output schema, and no annotations), the description is inadequate. It doesn't explain what a Liveblocks thread is, what the parameters mean, what the tool returns, or any behavioral traits. For a creation tool with such schema complexity, more context is needed to be complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds no information about the parameters 'roomId' or 'data', leaving their purpose and format completely undocumented. It mentions 'userId' but only as a guideline, not as a parameter explanation. This fails to compensate for the coverage gap.

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 ('Create') and resource ('a Liveblocks thread'), making the purpose understandable. It distinguishes from siblings like 'create-comment' by specifying it's for threads, not comments. However, it doesn't fully differentiate from 'edit-thread-metadata' or 'mark-thread-as-resolved' in terms of thread lifecycle stages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some guidance with 'Always ask for a userId', which implies a prerequisite or best practice. However, it doesn't explicitly state when to use this tool versus alternatives like 'create-comment' or 'create-room', nor does it mention any exclusions or specific contexts where this tool is preferred.

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

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