# roadmap_save

Create or Update Roadmap

## Beschreibung

Linear-style upsert for a roadmap (the container, not its
entries). Omit `id` to create, pass `id` to update.

Create requires `title` AND `workspace_id`. Workspace is immutable
after creation — `workspace_id` is silently ignored on update
(entries are workspace-scoped, so switching workspaces would orphan
them).

Update semantics:
- Fields you omit are left untouched (no silent clears).
- `archived: true` archives, `false` unarchives, omitted
  leaves the state alone. Independent of `status`.
- `status` is one of `planned` / `in_progress` / `done`.
- Description accepts Markdown and round-trips via Tiptap
  JSON. Passing an empty string clears the description.

To manage entries, use `roadmap_entry_save` /
`roadmap_entry_destroy` — this tool doesn't touch them.

## Zugriff

Zugriffsprofil: `gated`. Module: `projects_tasks`.
Die Freigabe im Profil ersetzt keine Account-, Workspace- oder Rollenberechtigung.

## Parameter

| Name | Typ | Pflicht | Beschreibung |
| --- | --- | --- | --- |
| `account_id` | string | Ja |  |
| `id` | string | Nein | Roadmap prefix ID (rmap_…). Omit to create. |
| `workspace_id` | string | Nein | Required on create. Workspace prefix ID or short key (e.g. ENG). Ignored on update. |
| `title` | string | Nein | Required on create. |
| `status` | string | Nein | Editorial state. Defaults to planned on create; left alone on update when omitted. |
| `description_markdown` | string / null | Nein | Markdown. Empty string clears the description; null leaves it alone. |
| `archived` | boolean | Nein | true=archive, false=unarchive, omit=leave alone. |

## Eingabeschema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "account_id": {
      "type": "string"
    },
    "id": {
      "type": "string",
      "description": "Roadmap prefix ID (rmap_…). Omit to create."
    },
    "workspace_id": {
      "type": "string",
      "description": "Required on create. Workspace prefix ID or short key (e.g. ENG). Ignored on update."
    },
    "title": {
      "type": "string",
      "description": "Required on create."
    },
    "status": {
      "type": "string",
      "enum": [
        "planned",
        "in_progress",
        "done"
      ],
      "description": "Editorial state. Defaults to planned on create; left alone on update when omitted."
    },
    "description_markdown": {
      "type": [
        "string",
        "null"
      ],
      "description": "Markdown. Empty string clears the description; null leaves it alone."
    },
    "archived": {
      "type": "boolean",
      "description": "true=archive, false=unarchive, omit=leave alone."
    }
  },
  "required": [
    "account_id"
  ],
  "type": "object"
}
```

## Ausgabeschema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "roadmap": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "rmap_…"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "planned",
            "in_progress",
            "done"
          ]
        },
        "archived": {
          "type": "boolean"
        },
        "workspace": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "key": {
              "type": "string"
            },
            "name": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "key",
            "name"
          ]
        },
        "entry_count": {
          "type": "integer"
        },
        "updated_at": {
          "type": "string",
          "description": "ISO 8601."
        },
        "created_at": {
          "type": "string",
          "description": "ISO 8601."
        }
      },
      "required": [
        "id",
        "title",
        "status",
        "archived",
        "workspace",
        "entry_count",
        "updated_at",
        "created_at"
      ]
    }
  },
  "required": [
    "roadmap"
  ],
  "type": "object"
}
```
