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}`);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'receive and consume' and 'poll periodically,' which implies a read operation with potential side effects (consumption). However, it lacks details on critical behaviors: whether messages are deleted after consumption, authentication needs, rate limits, error handling, or what happens if no messages are available. This leaves significant gaps for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences that are front-loaded: the first states the core purpose, and the second adds behavioral context. There's no wasted text, and it's appropriately sized for the tool's complexity. However, it could be slightly more structured by explicitly separating purpose from usage.

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 (a message consumption tool with potential side effects), no annotations, no output schema, and 0% schema coverage, the description is incomplete. It lacks details on parameters, return values, error conditions, and full behavioral traits. The description alone doesn't provide enough context for an agent to use the tool effectively without guessing.

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 for undocumented parameters. It doesn't mention any parameters or their semantics. The two parameters ('name' and 'msg_type') are entirely unexplained in the description, failing to add meaning beyond the bare schema. This is inadequate given the low coverage.

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 tool's purpose with specific verbs ('receive and consume messages') and identifies the resource ('for an agent'). It distinguishes from siblings like mq_send (sending) and mq_history (viewing history), though it doesn't explicitly name alternatives. The purpose is specific but could be more precise about what distinguishes it from mq_ls or mq_add.

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 provides implied usage guidance by mentioning 'poll periodically to check for new messages,' which suggests when to use this tool (for ongoing message consumption). However, it doesn't explicitly state when to use this vs. alternatives like mq_history for past messages or mq_send for sending. No exclusions or prerequisites are mentioned, leaving gaps in guidance.

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

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