mavis_comm_peers
List all reachable (active) sessions in the Mavis network, optionally filtered by agent name or session ID, to discover available peers for communication.
Instructions
List all reachable (active) sessions in the Mavis network.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent | No | Filter by agent name (e.g. mavis, coder, general) | |
| sessionId | No | Session ID to query peers for (defaults to __MAVIS_PARENT_SESSION_ID) |
Implementation Reference
- src/index.js:225-226 (handler)The mavis_comm_peers tool is executed via the generic runTool function (line 77). This spec object defines the tool's buildArgs, which constructs the CLI args ['communication', 'peers'] and resolves sessionId from input or env var. No custom execFn is set, so it uses execMavisJSON (line 84) to call the Mavis binary.
} }, - src/index.js:213-216 (schema)Input schema for mavis_comm_peers: optional 'agent' (string) and optional 'sessionId' (string) fields defined using zod.
inputSchema: z.object({ agent: z.string().optional().describe('Filter by agent name (e.g. mavis, coder, general)'), sessionId: z.string().optional().describe('Session ID to query peers for (defaults to __MAVIS_PARENT_SESSION_ID)') }), - src/index.js:211-211 (registration)The tool spec is registered in the 'tools' array (line 98) under the name 'mavis_comm_peers'. The MavisServer constructor (line 484) builds a toolMap from this array and registers handlers via ListToolsRequestSchema (line 486) and CallToolRequestSchema (line 494).
name: 'mavis_comm_peers',