# Caretaker T3 bridge — guide for Grok Bot

This MCP server (https://grok.lawlorsolutions.com/mcp) lets you start **T3 Code** agent threads on Joseph's own computers
(Macs and Linux boxes run by his Caretaker fleet manager), learn when they finish, read the
result, and search old threads. Joseph decides which projects you may use in Caretaker; you
only ever see those.

## One-time setup (do these in order)

1. **You are connected** if you can read this through the `caretaker_setup_guide` tool.
   Sign-in happens through OAuth: Joseph approves the code on his Caretaker page.
2. **Create a routine with a webhook trigger** so Caretaker can wake you when a thread finishes:
   - Name: `Caretaker thread finished`
   - Instruction (copy exactly):
     > A Caretaker T3 thread changed state. The JSON body says which device, project and thread,
     > its status, and the agent's final message. If event is "test", reply to Joseph that the
     > Caretaker webhook works. Otherwise call t3_thread_read with the device and thread_id if you
     > need more than final_message, then send Joseph a short, plain-English summary: what was
     > asked, what the agent did or found, anything it needs from him, and the thread title so he
     > can open it in T3. If status is waiting_approval or waiting_input, tell him the thread is
     > waiting for him in T3 on that device. Do not start new threads from this routine.
   - Trigger: **Webhook**. Copy its **POST to** URL and its **key**.
3. Call `grok_webhook_register` with that `url` and `key`, then call `grok_webhook_test`.
   The test ping arrives as a run of that routine within a few seconds.
4. Ask Joseph to set the Caretaker tools to **Allow automatically** (so routine runs don't stop
   at an approval card that expires after ten minutes) and to turn on Bot **Notifications**.

## Tools

| Tool | Use |
|---|---|
| `t3_device_list` | Devices you may use (`device` id, name, online). |
| `t3_project_list` | Projects per device (`project_id`, title, folder). Omit `device` for all. |
| `t3_model_list` | Models per device with options: thinking (`effort` / `reasoningEffort` / `thinking`) and speed (`fastMode` / `serviceTier`), plus any others such as `contextWindow`. |
| `t3_thread_launch` | Start a thread: `device`, `project_id`, `message`; optional `title`, `model`, `provider`, `thinking`, `speed`, `options`, `workspace`, `notify`. |
| `t3_thread_read` | Status, `final_message`, and a page of messages (`after`, `limit`). |
| `t3_thread_wait` | Wait up to 20 s for a status change (for quick tasks only). |
| `t3_thread_list` | Recent threads on a device, filterable by project, title, status. |
| `t3_thread_search` | Search titles and message text across devices. |
| `t3_thread_send` | Follow-up message to an existing thread. |
| `t3_request_result` | Collect an answer that came back `pending`. |
| `grok_webhook_register` / `grok_webhook_test` / `grok_webhook_status` | Manage the ping. |

## Choosing a model

Leave `model` out to use the project's usual model. Otherwise pick from `t3_model_list` for that
device: `model` is the model id (for example `claude-opus-5-5`), `thinking` is one of the model's
effort choices (for example `high`, `xhigh`, `max`), and `speed` is `fast` or `standard` when the
model has a speed option. If Joseph says "Opus high fast", that is
`model: "claude-opus-5-5", thinking: "high", speed: "fast"`.

## Webhook body

```json
{"source": "caretaker", "event": "thread.completed", "device": "linux-2", "device_name": "Linux 2",
 "project_id": "…", "project": "Loom", "thread_id": "…", "title": "Fix flaky upload test",
 "status": "completed", "waiting_for": null, "final_message": "…first 4,000 characters…",
 "final_message_truncated": false, "next_step": "Call t3_thread_read …"}
```

`event` is `thread.completed`, `thread.failed`, `thread.interrupted`, `thread.waiting_approval`,
`thread.waiting_input` or `test`.

## Rules

- Start threads only for work Joseph asked for, and say which device and project you used.
- Threads run with full access inside the project. Write instructions a capable engineer could
  follow without this conversation; include acceptance criteria.
- Never put passwords, tokens or keys in a thread message.
- Results go to Joseph in plain English; he can open the thread in T3 Code for the details.
