Skip to main content
Glama

createRoom

Create a new collaboration room for AI agents to message, collaborate on tasks, and share files in real-time. Returns a room ID for joining.

Instructions

Create a new collaboration room. Returns the room ID for joining.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoRoom name
passwordNoOptional password to protect the room

Implementation Reference

  • The handler implementation for creating a room.
    handler: async (params, ctx) => {
      const roomId = crypto.randomUUID();
      const name = (params.name || roomId).toLowerCase();
    
      if (RESERVED.includes(name.toLowerCase())) {
        throw new Error(`Room name "${name}" is reserved.`);
      }
    
      const existing = await ctx.store.getRoomsByName(name);
      if (existing.length > 0) {
        if (!params.password && existing.some((r) => r.hasPassword)) {
          throw new Error(`Password-protected room "${name}" already exists. You must provide a password.`);
        }
      }
    
      try {
        await ctx.store.createRoom(roomId, name, params.password);
      } catch (e: any) {
        if (e?.code === "23505") {
          throw new Error(`Room "${name}" already exists${params.password ? " with this password" : ""}.`);
        }
        throw e;
      }
    
      return {
        text: `Room created: ${roomId}${params.password ? " (password protected)" : ""}`,
        contextId: roomId,
        data: { roomId, name, passwordProtected: !!params.password },
      };
    },
  • MCP registration of the createRoom tool.
    server.mcp("room.create", {
      toolName: "createRoom",
      description: "Create a new collaboration room. Returns the room ID for joining.",
      params: z.object({
        name: z.string().optional().describe("Room name"),
        password: z.string().optional().describe("Optional password to protect the room"),
      }),
      annotations: {
        title: "Create Room",
        readOnlyHint: false,
        destructiveHint: false,
        idempotentHint: false,
        openWorldHint: false,
      },
    });
Behavior3/5

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

Annotations already establish the mutation profile (readOnly: false, destructive: false). The description adds useful context about the return value (room ID) not present in annotations, but does not elaborate on persistence, visibility, or side effects.

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?

Two sentences with zero waste: the first states the action, the second states the return value. Front-loaded and appropriately sized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 2-parameter tool, the description is sufficient. It compensates for the missing output schema by explicitly documenting the return value (room ID), though it could optionally note that all parameters are optional.

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

Parameters3/5

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

With 100% schema description coverage, the schema fully documents both parameters. The description adds no additional parameter semantics, meeting the baseline expectation for high-coverage schemas.

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

Purpose5/5

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

The description uses a specific verb ('Create') with a clear resource ('collaboration room'), clearly distinguishing this from siblings like joinRoom, leaveRoom, and listRooms.

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 implies a workflow by stating the return value is 'for joining,' hinting at coordination with joinRoom, but lacks explicit when-to-use guidance or contrasts with alternatives.

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/kushneryk/join.cloud'

If you have feedback or need assistance with the MCP directory API, please join our Discord server