Skip to main content
Glama
liveblocks

Liveblocks

Official
by liveblocks

subscribe-to-thread

Subscribe to a Liveblocks thread to receive real-time updates and notifications about conversations in collaborative rooms.

Instructions

Subscribe to a Liveblocks thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYes
threadIdYes
dataYes

Implementation Reference

  • Handler function that invokes the Liveblocks subscribeToThread method, wrapped in callLiveblocksApi for MCP response formatting.
    async ({ roomId, threadId, data }, extra) => {
      return await callLiveblocksApi(
        getLiveblocks().subscribeToThread(
          { roomId, threadId, data },
          { signal: extra.signal }
        )
      );
    }
  • Input schema for the subscribe-to-thread tool using Zod, requiring roomId, threadId, and userId in data.
    {
      roomId: z.string(),
      threadId: z.string(),
      data: z.object({
        userId: z.string(),
      }),
    },
  • src/server.ts:395-413 (registration)
    Registration of the 'subscribe-to-thread' tool using McpServer.tool method, including description, input schema, and handler.
    server.tool(
      "subscribe-to-thread",
      "Subscribe to a Liveblocks thread",
      {
        roomId: z.string(),
        threadId: z.string(),
        data: z.object({
          userId: z.string(),
        }),
      },
      async ({ roomId, threadId, data }, extra) => {
        return await callLiveblocksApi(
          getLiveblocks().subscribeToThread(
            { roomId, threadId, data },
            { signal: extra.signal }
          )
        );
      }
    );
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without disclosing behavioral traits. It doesn't mention whether this is a read/write operation, permission requirements, rate limits, or what happens upon subscription (e.g., real-time updates).

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, making it easy to parse quickly.

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?

For a tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain the tool's behavior, parameters, or expected outcomes, leaving significant gaps for an AI agent to understand and invoke it correctly.

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 description must compensate but adds no parameter information. It doesn't explain what 'roomId', 'threadId', or 'data.userId' represent or their expected formats, leaving all three parameters undocumented.

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 ('Subscribe to') and resource ('a Liveblocks thread'), providing a specific verb+resource combination. However, it doesn't differentiate from its sibling 'unsubscribe-from-thread' beyond the opposite action, missing explicit comparison.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like 'get-thread-subscriptions' or 'update-room-subscription-settings' is provided. The description lacks context about prerequisites or appropriate scenarios for subscription.

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