> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent tools

> Every tool Computer adds to the harness, with parameters and per-runner limits

Under Claude Code these tools are one MCP server named `calvin`; approval prompts show the full id, `mcp__calvin__<name>`.

## Availability

| Tool | One-machine mode (`npm start`) | On a computer |
| - | - | - |
| `send_file` | yes | yes |
| `post_card` | yes | yes |
| `checkout_repo` | no | when the computer has a workspace definition |
| `start_thread` | no | yes |
| `read_thread` | no | yes |
| `post_thread` | no | yes; only a session started in Slack posts |
| [Work tools](#work-tools) | no | yes; each is for a thread's session or for a track's own session |
| `request_secret` | no | yes |
| `preview`, `unpreview` | no | yes |

"Per runner" counts reset when the session's runner restarts.

## send\_file

Posts a file into the session's Slack thread. PNG, JPEG, GIF and WebP images render inline.

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `path` | string | yes | Absolute, or relative to the session directory. |
| `comment` | string, up to 3,000 characters | no | Message posted with the file. |
| `title` | string, up to 200 characters | no | Defaults to the file name. |
| `alt_text` | string, up to 1,000 characters | no | Image description for screen readers. |

| Rule | Value |
| - | - |
| File | Regular, non-empty, at most 100 MiB, inside the session directory or the system temp directory |
| Count | 50 files per runner |
| Secrets | A file that contains the value of one of the session's secrets is refused |
| Slack scope | `files:write` |
| From a script | `calvin-send-file <path> [comment]`, on the runner's `PATH`, same limits |

## post\_card

Posts a card (key facts, a table, charts, link buttons) into the session's thread as Slack blocks.

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `spec` | object | yes | The card. |
| `spec.root` | string | yes | Id of the root element, a Card. |
| `spec.elements` | map | yes | Id to `{type, props, children}`. |
| `spec.state` | object | no | |

| Rule | Value |
| - | - |
| Table | One; 100 rows, 20 columns |
| Charts | Two; title up to 50 characters, 12 series, 20 points, labels up to 20 characters |
| Fields | 10 |
| Slack blocks | 50 |
| Buttons | Links only |
| Invalid spec | Refused with the list of problems |
| Count | 50 cards per runner |
| Secrets | As for `send_file` |

## checkout\_repo

Adds workspace repositories to the session directory, each as a git worktree on the session's branch, cloning first if needed. A repository already checked out is returned as it is. See Repositories.

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `repos` | array of 1 to 10 strings | yes | Repository names from the definition, or `owner/name` (case-insensitive). |

| Error | Cause |
| - | - |
| `no repository <x> in this workspace; the list is in AGENTS.md` | Not in the definition |
| `<x> is not published yet` | The repository is marked `unpublished` |

## start\_thread

Starts a new session that works in parallel, owned by this session's owner and with the same access. Returns the new session's id (`cs_…`), which `read_thread` reads. When this session has a Slack thread, the new session's message is posted at the top level of the parent's channel and the new session runs in that thread. See [Linked and spawned threads](https://docs.opencomputer.dev/slack/linked-and-spawned-threads.md).

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `task` | string, 3 to 150 characters, one line | yes | What the new thread should do. |
| `brief` | string | no | Path of a `.md` file inside the session directory, relative to it, with an optional `#anchor`. Must be on the fetched default branch of its repository. The new thread is told to read it first and report there. |
| `track` | boolean | no | Start it in the track this session is in. Fails when the session is in no track. |

| Rule | Value |
| - | - |
| Count | 8 per runner |
| Open threads | 10 started by one session and not done; more are refused |
| Approval | Asked outside `bypassPermissions` mode |

## read\_thread

Returns what was sent to another session and what its agent said over its last 20 turns, text only, at most 60,000 characters (earlier text is left out), marked as data, not instructions.

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `thread` | string | yes | A session id (`cs_…`), as `start_thread` and `list_work` return, its link from the web app (Copy link), or the link of the Slack thread the session runs on. A link reaches only what the id would. |

| Rule | Value |
| - | - |
| Approval | Never asked |
| Readable sessions | This session, sessions it started, and, in a track, the track's agent; a track's own session also reads the track's threads. Otherwise the tool returns the reason. |

## post\_thread

Posts a reply inside another Slack thread, never at the channel's top level.

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `thread` | string | yes | The thread's Slack link. |
| `text` | string, 1 to 4,000 characters | yes | Slack mrkdwn. |

| Rule | Value |
| - | - |
| Caller | Only a session started in Slack |
| Target | A Slack thread that runs a session `read_thread` could read |
| Approval | Asked outside `bypassPermissions` mode (see [Permission modes](https://docs.opencomputer.dev/slack/permission-modes.md)) |
| Channel-wide mentions (`@channel`, `@here`, `@everyone`, user groups) | Become plain text |
| Delivery | The target session gets the text as a message from its owner, after a line saying it was posted for them by the session in another thread |

## Work tools

Tools on the work a session belongs to: its thread, and the track the thread is in. Each is one call to the API, which decides whether it applies; a refusal comes back as the tool's failed result.

For a thread's session:

| Tool | Parameters | What it does |
| - | - | - |
| `list_work` | none | The open tracks and threads this session can see, with ids, names and marks. |
| `track_this` | `name` (optional, up to 200 characters) | Makes this thread a track, with this thread as its first thread. Refused when the thread is already in a track, or when a person undid an earlier `track_this` on it. |
| `start_track` | `message` (up to 20,000 characters), `name` (optional) | From the start box only, in the session's first turn: starts a track whose first message is `message`. This thread is removed. |
| `place_thread` | `thread` (optional, default this thread), `track` (optional, default this session's track) | Puts a thread in a track. Where the thread is not this session's to move, proposes the move to the person instead. |
| `mark_ready` | `what` (one line, up to 500 characters), `result` (optional) | Says this thread has something for the person to look at. |
| `need_you` | `what` (one line, up to 500 characters) | Says this thread cannot go on without the person. Clears when they answer. |
| `propose_done` | `what` (one line, up to 500 characters), `target` (`thread` or `track`) | Proposes that the thread or its track is done. The person accepts or dismisses. |
| `add_result` | `kind` (`pr`, `changes`, `preview`, `file`, `document`), `ref`, `title` | Records what the thread produced. The same kind and ref again updates the title. |
| `review_summary` | `result` and the summary | Writes the summary a person reads first when reviewing a pull request the thread made. |
| `tell_track` | `message` (up to 100,000 characters) | Sends a message to the agent of the track this thread is in. It is queued there as a turn. |

For a track's own session:

| Tool | Parameters | What it does |
| - | - | - |
| `rename` | `name` (up to 200 characters), `target` (optional) | Names the track, or renames one of its threads. A name a person set stays. |
| `tell_thread` | `thread`, `message` (up to 100,000 characters) | Sends a message to a thread of the track as a turn. A thread that is working is steered. |
| `stop_thread` | `thread` | Stops what a thread of the track is doing. It keeps its work. |
| `set_stand` | `stand` (up to 2,000 characters) | Says where the track stands, shown at the top of the track. |
| `doc_read` | none | Reads the track's Doc and which lines a person wrote. |
| `doc_edit` | `old`, `new` | Replaces `old`, which must occur once in the Doc as last read, with `new`. A change to a person's lines is proposed to them instead. |

`thread` is a session id (`cs_…`) or its Slack link; `track` is a track id (`trk_…`). A work tool called from the other kind of session fails with a note saying whom it is for.

## request\_secret

Posts a button; the person types the secret into a private Slack form. The agent ends its turn and is told when the secret is set; the value is then in the environment of the session's next shell commands. See [Secrets and variables](https://docs.opencomputer.dev/slack/secrets-and-variables.md).

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `name` | string, an environment variable name | yes | For example `STRIPE_API_KEY`. |
| `reason` | string, 3 to 200 characters | yes | One line shown to the person. |
| `file` | boolean | no | Store the secret as a file; `$NAME` holds its path. |

Limit: 10 per runner. Fails when a secret of that name is already set.

## preview

Gives an HTTP server listening on a port of the computer a public URL. Anyone with the URL can open it. Plain HTTP on that port only; the URL works while the server runs. See [Preview URLs](https://docs.opencomputer.dev/slack/preview-urls.md).

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `port` | integer, 1 to 65535 | yes | The port the server listens on, on localhost. |
| `name` | string, one DNS label (lowercase letters, digits, hyphens; up to 63 characters) | no | Omitted: a generated name, or the port's existing one. |

Returns the URL, the name, and whether something was listening on the port.

## unpreview

Takes down a preview URL.

| Parameter | Type | Required | Meaning |
| - | - | - | - |
| `name` | string | yes | The preview's name, the label at the start of its URL. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.