Skip to main content
Glama

mq_recv

Receive and process messages for AI agents by polling the Agent-MQ message queue, enabling cross-session and cross-machine communication between coding agents.

Instructions

Receive and consume messages for an agent. Poll periodically to check for new messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
msg_typeNo

Implementation Reference

  • Registration and handler implementation of the "mq_recv" MCP tool, which calls the client's `recv` function.
    server.tool("mq_recv", "Receive and consume messages for an agent. Poll periodically to check for new messages.", {
      name: z.string(),
      msg_type: z.string().optional(),
    }, async ({ name, msg_type }) => {
      const msgs = await client.recv(name, msg_type || undefined) as unknown[];
      return { content: msgs.map(m => ({ type: "text" as const, text: JSON.stringify(m) })) };
    });
  • The underlying client logic that performs the HTTP request to the message queue server for receiving messages.
    export async function recv(name: string, msgType?: string) {
      const params = msgType ? `?type=${msgType}` : "";
      return api("GET", `/recv/${name}${params}`);
    }

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/bababoi-bibilabu/agent-mq'

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