Cross-model team messaging protocol core — a local same-user pool messaging system for coordinating between AI agents and models in the same worktree.
Modula Relay demonstrates solid definition quality with complete input schemas, clear descriptions, and thoughtful tool annotations. All 6 tools have explicit JSON Schema definitions with proper type constraints (min/max lengths, enums via Zod). Descriptions are substantive (ROSTER: 54 chars, DISPATCH: 73 chars, AWAIT: 380 chars, within the 10-1024 baseline). Tool annotations (readOnlyHint, destructiveHint, openWorldHint) are correctly applied and documented in code comments. However, output schemas are not formally documented, responses use a text wrapper with structuredContent but no schema declaration. Parameter descriptions are present but terse (e.g., 'Peer name or session id' lacks format guidance). Error handling is implicit (adapter methods) rather than explicit in tool definitions. No recovery guidance in descriptions.
Await an inbound request or an outbound reply for at most 30 seconds. Without msg_id it returns whichever arrives first: an inbound "request" to answer, or a completed "reply" to a request you dispatched earlier (so staying in the await loop is enough to receive answers). A timeout reports "peers": the number of other agents registered in this pool. peers=0 on a first timeout can mean registration is still in progress, so await once more; peers=0 on a second consecutive timeout means nobody registered — report the empty pool instead of looping.
Cancel in-flight outbound request(s) and free their send slots: by msg_id, by target peer name or session id, or every pending outbound when called with no arguments.
Dispatch one bounded request to a peer name or same-pool session id.
Poll an outbound reply without blocking.
Answer one inbound request.
List live same-worktree peers in this pool.
Output schemas not formally documented. Tools return text-wrapped structuredContent but no schema declaration visible in tool registration. LLMs cannot predict response structure for planning.
Parameter descriptions lack format/constraint guidance. 'msg_id' described as 'Message correlation id (min 1, max 128 chars)' but no guidance on format (alphanumeric? UUID?). 'target' accepts 'peer name or session id' but no example or validation rule.
Error handling not explicit in tool definitions. Adapter methods (adapter.send, adapter.respond) may fail, but no error classification or recovery guidance in descriptions. LLM cannot distinguish retryable vs fatal failures.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | 2025-06-18+ | v2 |
relay_dispatch response_schema parameter accepts 'Record<string, unknown>' but no guidance on valid schema format. LLM cannot validate schema before passing it.
relay_await timeout behavior documented in description but not in parameter constraints. 'timeout_ms' max 30000 is enforced in Zod but LLM must parse description to learn this. Should be in param description.