> ## Documentation Index
> Fetch the complete documentation index at: https://swayamg20-agentrelay-44.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Tools Overview: All 7 AgentRelay Tools

> A guide to all seven AgentRelay MCP tools — how agents invoke them, what each tool does, and how they map to the handoff lifecycle.

AgentRelay exposes its functionality as seven MCP tools that your coding agent (Claude Code, Codex CLI, or any MCP-compatible harness) can call by name. When you tell your agent "send a handoff to frank\@acme", it translates that instruction into a `handoff_to_teammate` tool call. The MCP server handles authentication, input validation with zod, idempotency key generation, and the actual A2A JSON-RPC call to the relay — your agent never speaks to the relay directly.

## The seven tools

| Tool                  | Side     | One-line description                                     |
| --------------------- | -------- | -------------------------------------------------------- |
| `handoff_to_teammate` | Sender   | Package context and send a handoff to a teammate's agent |
| `check_inbox`         | Receiver | List pending and active handoffs addressed to you        |
| `accept_handoff`      | Receiver | Pull full thread context into the current session        |
| `view_thread`         | Both     | Read a thread's messages and artifacts without accepting |
| `send_message`        | Both     | Append a reply to an existing thread                     |
| `complete_handoff`    | Receiver | Mark a thread completed and return a result summary      |
| `list_teammates`      | Both     | Discover registered teammates by role, skill, or repo    |

## How agents invoke tools

Your agent receives natural language instructions and maps them onto tool calls. The MCP protocol handles the translation — you do not need to write JSON or call any API. Below are examples of how each tool is typically invoked.

**`handoff_to_teammate`** — kick off a new thread

> "Send a handoff to bob\@acme. Tell him I refactored the /users endpoint — the response is now paginated. Attach the diff."

**`check_inbox`** — scan for new work

> "Check my inbox for pending handoffs."
> "Are there any accepted threads that have new messages?"

**`accept_handoff`** — pull a thread into the session

> "Accept handoff `01HXYZ` and load all the context."

**`view_thread`** — read without acting

> "Show me the current state of thread `01HXYZ`."
> "What did bob say in the latest message on that thread?"

**`send_message`** — reply in-thread

> "Reply to thread `01HXYZ`: I need the expected response shape for the `/search` endpoint before I can complete this."

**`complete_handoff`** — close a thread

> "Mark handoff `01HXYZ` complete. Summary: updated the API client to handle paginated responses; all tests pass."

**`list_teammates`** — find who owns something

> "List all backend teammates."
> "Who owns the `apps/web/` directory?"

## Handoff lifecycle

The seven tools map onto four phases of a handoff's lifetime:

```
[Sender]                         [Receiver]
    │                                 │
    │  handoff_to_teammate            │
    │─────────────────────────────────▶  thread created (status: pending)
    │                                 │
    │  view_thread (optional)         │  check_inbox
    │◀─────────────────────────────── │  accept_handoff  (status: accepted)
    │                                 │
    │  send_message (if question)     │  send_message
    │◀────────────────────────────────▶  back-and-forth replies
    │                                 │
    │                                 │  complete_handoff (status: completed)
    │◀─────────────────────────────── │
```

`list_teammates` sits outside the lifecycle — it is a discovery tool you can call at any time to find the right recipient before sending.

## Tool reference pages

<CardGroup cols={2}>
  <Card title="handoff_to_teammate" icon="paper-plane" href="/tools/handoff-to-teammate">
    Send structured context — diffs, contracts, questions — to a teammate's agent
  </Card>

  <Card title="check_inbox, accept_handoff, and more" icon="inbox" href="/tools/inbox-and-threads">
    The full receive-side workflow: inbox, accept, reply, and complete
  </Card>

  <Card title="list_teammates" icon="users" href="/tools/list-teammates">
    Discover teammates by role, skill, or repository ownership
  </Card>

  <Card title="Setup guide" icon="plug" href="/setup/developer-onboarding">
    Wire the MCP server into Claude Code or Codex CLI
  </Card>
</CardGroup>

<Note>
  The `propose_action` intent and the `draft_proposed_action` tool are v0.1.5 features. Both are described inline throughout these pages where they affect an existing tool's behavior. Standalone documentation for `draft_proposed_action` will ship with the v0.1.5 release notes.
</Note>
