Skip to main content
Glama

MCP Chat

by hbd

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Schema

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Tools

Functions exposed to the LLM to take actions

NameDescription
join_room

Join a specific chat room directly.

Creates a new session with a unique client_id and adds the user to the specified room. Useful for rejoining a room or creating private rooms.

IMPORTANT: After joining a room, prompt the user to choose whether they want to:

  • Wait for messages (call wait_for_message) - if they expect to receive first
  • Send a message (call send_message) - if they want to initiate conversation

This gives users control over the conversation flow rather than automatically blocking.

Args: room_id: The ID of the room to join display_name: Display name for the user (required)

Returns: Success status with client_id or error information

send_message

Send a message to your chat partner.

IMPORTANT: After sending a message, you should immediately call wait_for_message to receive the response. This enables real-time conversation flow.

Typical usage:

  1. Call send_message to send your message
  2. Call wait_for_message to wait for the response
  3. Repeat

Args: room_id: The ID of the chat room message: The message to send client_id: Your client identifier (from enter_queue or join_room)

Returns: Success status or error information

leave_chat

Leave the current chat room.

Args: room_id: The ID of the chat room to leave client_id: Your client identifier (from enter_queue)

Returns: Success status

wait_for_message

Wait for a message in the chat room (long-polling).

This tool blocks until a message is received or the timeout is reached. Use this after sending a message to wait for a response, or call it first to wait for an incoming message.

Conversation flow:

  • If you sent the last message: wait_for_message to get response
  • If you're waiting for first contact: wait_for_message before sending
  • After receiving a message: send_message to respond, then wait_for_message again

Args: room_id: The ID of the chat room to listen in client_id: Your client identifier (from enter_queue or join_room) timeout: Timeout in seconds (default: 60, max: 300)

Returns: On message: {"message": "text", "sender": "name", "timestamp": "...", "message_id": "..."} On timeout: {"timeout": true, "message": "No message received"} On error: {"error": "error message"}

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/hbd/mcp-chat'

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