Skip to main content
Glama

peer_exchange

Send plan proposals, point-by-point critiques, or final agreements to a peer AI agent asynchronously, optionally wait for live replies, and keep discussions isolated per project.

Instructions

Send a plan proposal, point-by-point critique, or final agreement to the peer agent (claude or antigravity). Async-first by default (wait_for_reply=false): queues your message immediately and returns so you can switch harnesses at your own pace. Set wait_for_reply=true only when you want an opt-in live blocking ping-pong debate.

Planning Review Protocol:

  1. Pass project_path (your current workspace root) so discussions stay cleanly isolated per repository.

  2. Summarize key points concisely in your chat window before calling peer_exchange.

  3. Be rigorous: verify claims against the codebase and address points explicitly (e.g. "Point 1: Agree. Point 2: Disagree because...").

  4. Use stance="propose" for an initial plan or major revision; stance="critique" for objections or improvements; stance="agreed" ONLY when you agree 100% with zero further changes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message": "<message>",
      "stance": "<stance>"
    },
    "name": "peer_exchange"
  }
}

Input Schema

NameRequiredDescriptionDefault
roomNoOptional explicit room name override (e.g. "auth-refactor"). If omitted, derived from project_path or falls back to "default".
topicNoOptional short title for the discussion topic.
stanceYes"propose" for initial plan or major rework; "critique" when raising any objection, question, or improvement; "agreed" ONLY when you agree 100% with the peer's latest version with zero changes.
messageYesYour full message to the peer agent (plan proposal, numbered critique, or final agreement summary).
new_sessionNoSet to true ONLY on the first message of a brand-new topic to archive previous messages and start a clean planning session (dev handoffs are preserved).
timeout_secNoSeconds to wait per heartbeat cycle when wait_for_reply=true (default: 45, max: 120).
project_pathNoOptional absolute path to the current workspace or repo. Automatically walks up to the git root and derives a deterministic per-project room ID so both agents share the same room.
wait_for_replyNoWhether to block and wait live for the peer reply (default: false for async-first reviews; set true for live ping-pong debate). Automatically false when stance="agreed" reaches consensus.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose key behavior: messages are queued immediately and the call returns, blocking behavior and per-heartbeat timeout semantics exist only under wait_for_reply, rooms are derived from the repo root, and new_session archives prior messages while preserving dev handoffs. What it does not disclose is the delivery path for the reply (where the queued answer surfaces) or what the call itself returns.

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 default-behavior contrast is correctly front-loaded in sentence one, and the numbered protocol is scannable. A few lines (step 2's advice to summarize in the chat window) address agent workflow rather than tool mechanics, so there is minor padding, but nothing is redundant with the schema's prose.

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

Completeness3/5

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

For an 8-parameter async-first tool with no output schema and no annotations, the definition covers inputs well but leaves the async contract incomplete: it never says what the call returns, nor how the queued reply is subsequently retrieved (presumably via a sibling like peer_inbox or peer_wait) or how long it persists. An agent knows how to send but not how the conversation continues.

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?

Schema coverage is 100%, so the schema already documents room, topic, stance, message, new_session, timeout_sec, project_path, and wait_for_reply with defaults and enums. The description adds rationale rather than new syntax ('so discussions stay cleanly isolated per repository'), and re-states the stance guidance nearly verbatim from the schema. Baseline 3 is appropriate.

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 first sentence names a concrete verb and resource ('Send a plan proposal, point-by-point critique, or final agreement to the peer agent') and immediately contrasts the default async queue-and-return mode with the opt-in 'live blocking ping-pong debate'. An agent can tell this apart from a status/inbox-style sibling without opening the schema.

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

Usage Guidelines5/5

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

It gives explicit when/when-not rules for the two risky choices: wait_for_reply=false is the default and only set true for opt-in live debate, and stance='agreed' is reserved for 100% agreement with zero changes. The numbered protocol adds concrete preconditions (pass project_path, summarize before calling, verify against the codebase).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.