Skip to main content
Glama
liveblocks

Liveblocks

Official
by liveblocks

get-yjs-document

Retrieve a Yjs text document from a Liveblocks collaborative room to access and work with shared real-time content.

Instructions

Get a Liveblocks Yjs text document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomIdYes
optionsNo

Implementation Reference

  • src/server.ts:208-226 (registration)
    Registration of the MCP tool 'get-yjs-document' using McpServer.tool()
    server.tool(
      "get-yjs-document",
      "Get a Liveblocks Yjs text document",
      {
        roomId: z.string(),
        options: z
          .object({
            format: z.boolean().optional(),
            key: z.string().optional(),
            type: z.string().optional(),
          })
          .optional(),
      },
      async ({ roomId, options }, extra) => {
        return await callLiveblocksApi(
          getLiveblocks().getYjsDocument(roomId, options, { signal: extra.signal })
        );
      }
    );
  • Zod input schema for the 'get-yjs-document' tool: requires roomId, optional options object with format, key, type.
    {
      roomId: z.string(),
      options: z
        .object({
          format: z.boolean().optional(),
          key: z.string().optional(),
          type: z.string().optional(),
        })
        .optional(),
    },
  • Handler function that delegates to Liveblocks client's getYjsDocument method via callLiveblocksApi wrapper.
    async ({ roomId, options }, extra) => {
      return await callLiveblocksApi(
        getLiveblocks().getYjsDocument(roomId, options, { signal: extra.signal })
      );
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as whether this is a read-only operation, potential side effects, authentication needs, rate limits, or what the return format looks like. This is inadequate for a tool with parameters and no output schema.

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 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?

Given the complexity (2 parameters with nested objects, 0% schema coverage, no output schema, no annotations), the description is incomplete. It lacks details on parameters, return values, behavioral context, and usage relative to siblings, making it insufficient for effective tool selection and 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 adds no information about parameters. It doesn't explain what 'roomId' or 'options' (with 'format', 'key', 'type') mean or how they affect the operation, leaving all 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 ('Get') and resource ('a Liveblocks Yjs text document'), making the purpose understandable. It doesn't explicitly differentiate from sibling tools like 'get-storage-document' or 'get-room', but the specificity of 'Yjs text document' provides some distinction.

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 like 'get-storage-document' or 'get-room', nor any context about prerequisites or typical use cases. The description only states what it does, not when to use it.

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