Skip to main content
Glama
liveblocks

Liveblocks

Official
by liveblocks

get-comment

Retrieve specific comments from Liveblocks collaborative rooms using room, thread, and comment identifiers for real-time collaboration management.

Instructions

Get a Liveblocks comment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYes
threadIdYes
commentIdYes

Implementation Reference

  • src/server.ts:474-490 (registration)
    Registration of the 'get-comment' MCP tool, including schema and handler function.
    server.tool(
      "get-comment",
      `Get a Liveblocks comment`,
      {
        roomId: z.string(),
        threadId: z.string(),
        commentId: z.string(),
      },
      async ({ roomId, threadId, commentId }, extra) => {
        return await callLiveblocksApi(
          getLiveblocks().getComment(
            { roomId, threadId, commentId },
            { signal: extra.signal }
          )
        );
      }
    );
  • Handler function that fetches the specified comment from Liveblocks API using getLiveblocks().getComment and formats the response.
    async ({ roomId, threadId, commentId }, extra) => {
      return await callLiveblocksApi(
        getLiveblocks().getComment(
          { roomId, threadId, commentId },
          { signal: extra.signal }
        )
      );
    }
  • Zod input schema defining parameters: roomId, threadId, and commentId as strings.
    {
      roomId: z.string(),
      threadId: z.string(),
      commentId: z.string(),
    },
  • Helper function callLiveblocksApi used by the handler to wrap Liveblocks API calls and format MCP responses.
    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,
            },
          ],
        };
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states 'Get' which implies a read-only operation, but doesn't disclose any behavioral traits like authentication needs, rate limits, error conditions, or what the return format might be. This leaves significant gaps for an agent to understand how to use it effectively.

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 no wasted words. It's appropriately sized for a simple-sounding tool and front-loaded with the core action, though it could benefit from more detail given the lack of other documentation.

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 (3 required parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the hierarchical relationship between roomId, threadId, and commentId, what data is returned, or any prerequisites. This leaves too many unknowns for reliable tool invocation.

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 it adds no parameter information. The three required parameters (roomId, threadId, commentId) are undocumented in both schema and description, leaving their meaning and format unclear. This is inadequate for a tool with three parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get a Liveblocks comment' clearly states the action (get) and resource (comment), but it's vague about scope and doesn't distinguish from siblings like 'get-thread' or 'get-threads'. It specifies the platform (Liveblocks) which helps, but lacks detail about what exactly is retrieved.

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 is provided on when to use this tool versus alternatives. With many sibling tools like 'get-thread' or 'get-threads', the description doesn't explain if this is for retrieving a single comment within a thread/room context or how it differs from other get operations.

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