> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# mammoth annotation

> All 5 mammoth annotation commands with examples, arguments and confirmation flags: Manage annotations on Mammoth resources.

> Generated from mammoth-cli 2.4.2, released 2026-11-02: `mammoth schema list`, `mammoth capability list` and the CLI's own `--help`. Do not edit by hand; run `npm run docs:capabilities`.

Manage annotations on Mammoth resources. 5 commands.

Every command also takes the [global flags](https://mammoth.io/docs/build/cli/global-flags/) (`--output`, `--yes`, `--confirm`, `--dry-run`, `--input`, `--profile`, ...), which are not repeated below. `--input` takes a JSON or YAML document of the input fields; `mammoth schema get COMMAND_ID` prints a command's full input schema.

**Confirmation.** Commands marked `--yes --confirm TARGET` or `--yes` always need those flags, even at a terminal: they never prompt. Commands marked "`--yes` or prompt" ask at an interactive terminal (table output, no `--no-input`) and otherwise need `--yes`. `--dry-run` skips confirmation and sends nothing.

## Summary

| Command | What it does | Effect | Confirmation |
|---|---|---|---|
| [`annotation create`](#mammoth-annotation-create) | Create an annotation on a target. Target and body come from '--input'. | Benign mutation | — |
| [`annotation delete`](#mammoth-annotation-delete) | Delete one annotation by id. Prompt or '--yes' required. | Destructive | `--yes` or prompt |
| [`annotation list`](#mammoth-annotation-list) | List annotations in the active project, optionally filtered by target. | Read | — |
| [`annotation update`](#mammoth-annotation-update) | Update an annotation's status. Annotation id is positional; status is required input. | Benign mutation | — |
| [`annotation comment add`](#mammoth-annotation-comment-add) | Add a comment to an annotation. Annotation id is positional; body is required input. | Benign mutation | — |

## annotation commands

### mammoth annotation create

Create an annotation on a target. Target and body come from '--input'.

```bash
mammoth annotation create --input '{"target_type": "dataview", "target_id": 1, "body": "Quarterly revenue summary"}'
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `target_type` | `--input` field | yes | — | `str` |  |
| `target_id` | `--input` field | yes | — | `int` |  |
| `body` | `--input` field | yes | — | `str` |  |

- **Effect:** Benign mutation, scope `project` · **Confirmation:** none
- **Id:** `annotation.create` · **Result:** `AnnotationCreateResult` · **Backed by:** SDK `mammoth.api.annotations.AnnotationsAPI.create`, API `POST /workspaces/{workspace_id}/projects/{project_id}/annotations` (CreateAnnotation)

### mammoth annotation delete

Delete one annotation by id. Prompt or '--yes' required.

```bash
mammoth annotation delete 123 --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `ANNOTATION_ID` | positional | yes | — | `int` | ID of the annotation. |

- **Effect:** Destructive, scope `project` · **Confirmation:** `--yes`, or answer the prompt at an interactive terminal
- **Preconditions:** Required inputs: ANNOTATION_ID.
- **Id:** `annotation.delete` · **Result:** `AnnotationDeleteResult` · **Backed by:** SDK `mammoth.api.annotations.AnnotationsAPI.delete`, API `DELETE /workspaces/{workspace_id}/projects/{project_id}/annotations/{annotation_id}` (DeleteAnnotation)

### mammoth annotation list

List annotations in the active project, optionally filtered by target.

```bash
mammoth annotation list
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `target_type` | `--input` field | no | — | `str` |  |
| `target_id` | `--input` field | no | — | `int` |  |

- **Effect:** Read, scope `project` · **Confirmation:** none · **Pages:** `single_page`
- **Id:** `annotation.list` · **Result:** `AnnotationListResult` · **Backed by:** SDK `mammoth.api.annotations.AnnotationsAPI.list`, API `GET /workspaces/{workspace_id}/projects/{project_id}/annotations` (ListAnnotations)

### mammoth annotation update

Update an annotation's status. Annotation id is positional; status is required input.

```bash
mammoth annotation update 123 --input '{"status": "resolved"}'
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `ANNOTATION_ID` | positional | yes | — | `int` | ID of the annotation. |
| `status` | `--input` field | yes | — | `str` |  |

- **Effect:** Benign mutation, scope `project` · **Confirmation:** none
- **Preconditions:** Required inputs: ANNOTATION_ID.
- **Id:** `annotation.update` · **Result:** `AnnotationUpdateResult` · **Backed by:** SDK `mammoth.api.annotations.AnnotationsAPI.update`, API `PATCH /workspaces/{workspace_id}/projects/{project_id}/annotations/{annotation_id}` (PatchAnnotation)

## annotation comment

### mammoth annotation comment add

Add a comment to an annotation. Annotation id is positional; body is required input.

```bash
mammoth annotation comment add 123 --input '{"body": "Quarterly revenue summary"}'
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `ANNOTATION_ID` | positional | yes | — | `int` | ID of the annotation. |
| `body` | `--input` field | yes | — | `str` |  |

- **Effect:** Benign mutation, scope `project` · **Confirmation:** none
- **Preconditions:** Required inputs: ANNOTATION_ID.
- **Id:** `annotation.comment.add` · **Result:** `AnnotationCommentAddResult` · **Backed by:** SDK `mammoth.api.annotations.AnnotationsAPI.comment_add`, API `POST /workspaces/{workspace_id}/projects/{project_id}/annotations/{annotation_id}/comments` (AddComment)

---
Source: https://mammoth.io/docs/build/cli/annotation.md · Updated: 2026-11-02
