Skip to main content
Glama

ipc

Send and receive text messages between AI agent sessions over TCP, with point-to-point or broker-based reliable messaging.

Instructions

Inter-process communication between AI agent sessions over TCP.

Operations:

Point-to-point (no broker needed): send: Connect to remote host and send a text message. receive: Listen on a port and block until a message arrives (or timeout). Auto-responds to PING with PONG. No tokens consumed while waiting. ping: Send PING to remote host, wait for PONG, measure RTT.

Broker-based (reliable, no missed messages): broker_start: Start a message broker on this process (default port 19901). If another process already owns the port, connects as client instead. First caller wins the broker role. Both sessions use the same broker. broker_stop: Stop the broker (only if this process owns it). post: Send a message to a named mailbox (non-blocking). Params: to (target mailbox), from (your name), message, port (broker port). fetch: Get all pending messages from your mailbox (non-blocking, returns immediately). Params: mailbox (your name), port. wait: Block until a message arrives in your mailbox (or timeout). Params: mailbox, timeout (default 60s, max 300s), port. No tokens consumed while waiting. broker_status: Show queued message counts per mailbox.

Broker workflow (two sessions, no missed messages): Session A: broker_start -> wait(mailbox="A") [blocks until B posts] Session B: broker_start -> post(to="A", from="B", message="hello") -> wait(mailbox="B") Session A: receives "hello", replies: post(to="B", from="A", message="...") -> wait(mailbox="A") [repeat]

Point-to-point flow: Session A: receive(port=19900, timeout=120) -- blocks waiting Session B: send(host="localhost:19900", message="...") Session A gets the message, then: send(host="<B's address>:19900", message="response...") Session B: receive(port=19900, timeout=120)

Same machine: host="localhost:19900". Max message size: 1MB. Max timeout: 300s.

Persistent worker pattern (loop until shutdown): broker_start -> loop { wait(mailbox="me") -> [process task] -> post(to="orchestrator", ...) } To stop: orchestrator posts message="shutdown", worker checks and exits loop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYesOperation: send, receive, ping, broker_start, broker_stop, post, fetch, wait, broker_status,required
hostNoRemote host:port (e.g. '192.168.1.5:19900'). For send/ping
portNoPort number. receive default: 19900, broker default: 19901
messageNoMessage text. For send, post
timeoutNoTimeout in seconds. receive/wait default: 60 (max 300), send/ping default: 10
bindNoBind address. Default: 127.0.0.1 (local only). Use 0.0.0.0 for all interfaces
toNoTarget mailbox name. For post (e.g. 'agentB')
fromNoSender name. For post (e.g. 'agentA')
mailboxNoYour mailbox name. For fetch/wait (e.g. 'agentA')
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: auto-response to PING, no token consumption while waiting, broker ownership rules, message size limit, timeout limits, and blocking vs non-blocking behavior. This is comprehensive.

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 well-structured with headings, bullet lists, and workflow examples. It is comprehensive yet efficient, with no extraneous sentences. Every section adds value.

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

Completeness5/5

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

Given no output schema, the description thoroughly explains return behaviors (e.g., messages received, broker status) and includes complete workflows for both communication modes. It covers all operations and edge cases like 'persistent worker pattern'.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds significant context beyond schema, such as default ports for operations, the role of 'host' and 'bind', and how parameters like 'timeout' vary per operation, elevating understanding.

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 clearly states 'Inter-process communication between AI agent sessions over TCP' and lists distinct operations (send, receive, ping, broker_start, etc.), making the purpose specific and distinguishable from sibling tools like bash, httpreq, which are unrelated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit use cases for both point-to-point and broker-based communication, with step-by-step workflows. It lacks explicit 'when not to use' guidance, but the context is clear enough for an AI agent to select appropriately.

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/knewstimek/agent-tool'

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